I'm having trouble figuring out how to determine when a scheduler task is
done. My code/scheduler task work is working. But when I added this loop,
it does not--when I go into the admin interface and look at the
scheduler_task table, the task is not in the table at all. The printouts
show the task as always being in the QUEUED status. Is this code somehow
blocking the worker from picking up the task? What is the best way to
determine when a task has been completed?
q = scheduler.queue_task(read_blox, pvars=dict(json_dir_id=r.id), immediate
=True) #This line alone works without the following code
task_id = int(q.id)
res = scheduler.task_status(task_id)
print res
while not res.status == 'COMPLETED':
res = scheduler.task_status(task_id)
print res
print 'completed'
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.