ps: docs pretty self-explanatory, however .... setting STOP_TASK on the scheduler_worker row will terminate the currently RUNNING task (if any)
given myscheduler = Scheduler(db, ....) in models, in your controller you can call actually_stopped = myscheduler.stop_task(15) that will terminate task with id 15, while with actually_stopped = myscheduler.stop_task('edeb8b54-dda8-4ff9-9585-2abb4a05c73a') will terminate task with uuid edeb8b54-dda8-4ff9-9585-2abb4a05c73a If the task is RUNNING it will be terminated --> execution will be set as FAILED by the worker as soon as the worker "reads" the STOP_TASK command (~3 secs), really_stopped will be 1 If the task is QUEUED, its stop_time will be set as to "now", the enabled flag will be set to False, and the status will be set to STOPPED, really_stopped will be 1 If the task is on any other task status, even if the reference passed to stop_task() is legit, nothing will be done, really_stopped will be None -- --- 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/groups/opt_out.