Have some problems using taskqueues in google app engine. I tried doing the same as in this site:
https://developers.google.com/appengine/docs/python/taskqueue/overview-push
But it seems like my task is never executed, I get this error:
WARNING 2012-11-25 15:29:21,258 taskqueue_stub.py:1978] Task task1 failed to execute. This task will retry in 12.800 seconds
The code is mainly the same except of these:
class CounterWorker(webapp.RequestHandler):
def init(self): # should run at most 1/s
def txn():
logging.info("bla")
db.run_in_transaction(txn)
and I just add the task like this:
taskqueue.add(url='/worker')
What I really want is just running a block of code that dont timeouts. So I read I could use taskqueues. But I cant seem to make it work.
If you just want to execute tasks “vanilla” then have a look at the deferred functions.
Background work with the deferred library
You won’t need a url/webapp handler as you can pass the function directly.