You can now send a worker the command to cancel a task.
worker.command = 'cancel'
or which looks nicer
worker.execute('cancel')
This will cancel a task for good. You can also halt a task using halt. Which will also stop the task but allow you to restart it using
task.restart()
This works, when a task has failed, or halted (stopped by a user). Doing so will set the state back to created which can be picked up by a worker
This PR already includes the PyEMMA argument support
Another nice feature added is a shortcut to get an attribute or call a function on all elements in a bundle
project.workers.all.execute('shutdown')
by using project.workers.all you get a delegator that will apply the next command or attribute to all objects.
project.workers.all.state
>>> ['down', 'down', 'running', 'running']
This should make code look nicer in lots of cases. It works with all Bundles (like `.generators`, too).
You can now send a worker the command to cancel a task.
or which looks nicer
This will cancel a task for good. You can also halt a task using
halt
. Which will also stop the task but allow you to restart it usingThis works, when a task has
failed
, orhalted
(stopped by a user). Doing so will set the state back tocreated
which can be picked up by a workerThis PR already includes the PyEMMA argument support
Another nice feature added is a shortcut to get an attribute or call a function on all elements in a bundle
by using
project.workers.all
you get a delegator that will apply the next command or attribute to all objects.