Hi
I lift my hat off to mdipierro and all web2py contributors. I find it
amazing.
Here is a problem I have:
I'm trying to spawn a post action task that needs to access the
database.
When my PostConnectionTask tries to access db I get an error:
"ERROR:root:Callback execution failed for PostConnectionTask: Cannot
operate on a closed database."
So, obviously the task runs, but can't access the db somehow.
If I run the same code as a normal action (controller) there is no
problem.
@service.jsonrpc
def delete_all(app):
gluon.contrib.wsgihooks.localposttasks.append( TestRunner( request,
app ) )
return "ok"
class TestRunner(PostConnectionTask):
def __init__(self, env, app):
PostConnectionTask.__init__(self, env)
self.application = app
def start(self):
db(db.queue.id>0).delete()
Anyone with a clue why?
The only documentation I've found (exept for source code)
is from Achipa in this forum "-A New Cron (and post-connection tasks)"
My config:
Mac OS X 10.6.2
staring web2py with: python2.5 web2py/web2py.py -a pass &
web2py Version 1.74.8 (source code)
no cron jobs defined
cheers
Jonas
--
You received this message because you are subscribed to the Google Groups
"web2py-users" 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/web2py?hl=en.