db.scheduler_task.enabled

37 views
Skip to first unread message

Yoel Benitez Fonseca

unread,
Dec 10, 2019, 1:30:10 PM12/10/19
to web2py
what is the meaning of 

db.scheduler_task.enabled

Can I use it to temporarily disable a task?

--
Msc. Yoel Benítez Fonseca






Dave S

unread,
Dec 10, 2019, 4:48:58 PM12/10/19
to web2py-users


On Tuesday, December 10, 2019 at 10:30:10 AM UTC-8, Yoel Benitez Fonseca wrote:
what is the meaning of 

db.scheduler_task.enabled

Can I use it to temporarily disable a task?


Best not to use the table directly, because even for something as stable as the scheduler the table is an internal implementation detail subject to change.
scheduler.disable() is for workers based on group names, so may not be what you're looking for (affects all tasks that work does).

It appears that  queue_task will allow any scheduler_task column to be passed as a keyword argument.  Doing that for enabled is probably better than modifying the table directly, or you could make the start time 99 years from now, and immediate=True.

/dps

Reply all
Reply to author
Forward
0 new messages