> + GOTCHA: Until the foreground task ends, any db access by
> background task
> + will necessarily get old data from before the foreground task
> started
> + because psycopg2 begins a transaction in the foreground task
> until it quits """
This could be fixed by doing explicitly dereferencing db in
web.background.
def internal(*a, **kw):
web.data() # cache it
+ web.ctx.db = None
tmpctx = web._context[threading.currentThread()]
web._context[threading.currentThread()] = utils.storage
(web.ctx.copy())
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---