Thanks for the assistance. That query returned exactly the tasks that need to be (but are not) executed. I think it could be something about the web2py version. In the server (where tasks aren't executed) I'm running version 2.10.3. On localhost, I have the exact same configuration (ubuntu, nginx, uwsgi, postgres, same web2py apps installed), but web2py version is 2.10.4. Here in localhost, the tasks do get picked up and executed.
In the server, that query you suggested returns always the tasks that need to be (but are not) executed. On localhost, that query returns empty; if I keep runnign the query over and over, sometimes it returns a task, that is, a task that needs to be executed, but in the next execution of the query, it returns empty again. So, it's working on web2py 2.10.4 but not in 2.10.3. Does anybody knows if something change between those two versions regarding web2py's scheduler? This changelog is still a little old: http://www.web2py.com/init/default/changelog El martes, 12 de mayo de 2015, 18:12:52 (UTC-3), Niphlod escribió: > > not really. exceptions are not shown and "nothing to do" kinda leaves up > nothing to imagination.... > > you can inspect the worker_stats column on the worker that is also a > ticker but I assume you won't find anything. > > you can run this query to check for available tasks > > sw, st, sd = db.scheduler_worker, db.scheduler_task, db. > scheduler_task_deps > now = request.now > deps_with_no_deps = db( > (sd.can_visit == False) & > (~sd.task_child.belongs( > db(sd.can_visit == False)._select(sd.task_parent) > ) > ) > )._select(sd.task_child) > no_deps = db( > (st.status.belongs((QUEUED, ASSIGNED))) & > ( > (sd.id == None) | (st.id.belongs(deps_with_no_deps)) > > ) > )._select(st.id, distinct=True, left=sd.on( > (st.id == sd.task_parent) & > (sd.can_visit == False) > ) > ) > > all_available = db( > (st.status.belongs((QUEUED, ASSIGNED))) & > ((st.times_run < st.repeats) | (st.repeats == 0)) & > (st.start_time <= now) & > ((st.stop_time == None) | (st.stop_time > now)) & > (st.next_run_time <= now) & > (st.enabled == True) & > (st.id.belongs(no_deps)) > ) > > print all_available.select(st.ALL) > > > > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.