Cancel a single task. If the task is PENDING
it will be unqueued
and the status set to CANCELED
. If RUNNING
then the task will
be stopped if it was set to run in a separate process (i.e.,
queued with separate_process = TRUE
). Dependent tasks will be
marked as impossible.
rrq_task_cancel(task_id, wait = TRUE, timeout_wait = 10, controller = NULL)
Id of the task to cancel
Wait for the task to be stopped, if it was running.
Maximum time, in seconds, to wait for the task to be cancelled by the worker.
The controller to use. If not given (or NULL
)
we'll use the controller registered with
rrq_default_controller_set()
.
Nothing if successfully cancelled, otherwise throws an error with task_id and status e.g. Task 123 is not running (MISSING)