On Nov 3, 1:14 pm, Jorge Godoy <[EMAIL PROTECTED]> wrote:
> Back to when I started with TurboGears and when I needed something like that I
> coded the tasks as URLs and scheduled a job to access them and process their
> output.
>
> This looked to me at the time -- and today I have the same opinion -- that it
> was the simpler approach I could have and ensure that all behaved the same.

Yeah... I suppose that if the app handles requests in a thread-safe
manner then you can just make 2 requests and assume that they will be
handled correctly.

However, I still wonder if things like identity are handled properly
there - eg. if I'm logged in, make a request in one window to log out,
and in the other window I submit a form which repeated accesses
identity.current in the controller, what will happen? Exception raised
in the form's controller? One request or the other gets blocked until
the other completes? What about SQLObject - does it have any caching,
and if you modify the same object in different threads what happens to
that cache?

I don't think my problem is well suited to the additional request
method, as what I have is a task that needs to be started when a
particular page is submitted, but which needs to continue in the
background as it takes too long, modifying the database when it's
finished. I'd rather not have to pass everything off to an external
queue if possible, especially when running a function via the threading
module is so clean and simple. But I'd like some assurance that it's
safe to do so.

-- 
Ben Sizer


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to