Construct a worker
Construct a worker
Helper for more verbose DEBUG logging
Cancel currently running tasks.
Disable the worker from receiving new jobs.
Enable a disabled worker.
Trigger an execution of the worker.
Wait for all currently pending tasks to complete
Wait for task queue to empty.
Reports whether a fiber is currently handling a request
Run a job in a fiber, making sure never to run two simultaneously.
This semantics is useful for deferred jobs that need to collect or parse a state that changes. The number of jobs is not dependent on the number of state changes.
The usage is to trigger the worker when the state changes. If no job is currently running, a fiber is immediately launched to carry out the job. If the job is already running, it will trigger again once the current instance finishes.