Aborts a job by putting it into the Aborted
state.
Aborts a job by putting it into the Aborted
state. This is a terminal
state.
Add a message to a job's channel.
Add a message to a job's channel. If the channel does not exist, it will be created.
Cancels a job.
Cancels a job. This doesn't necessarily mean the job has actually stopped, it is just used to let the worker know a cancellation was requested. It is up to the worker to abort the job. A cancelled job may still be completed normally or aborted for other reasons than the cancellation. The reason should give a useful string about why the cancellation was requested (eg. "User action." or "Server restart.").
Create a new Job with the given API key, name, type and possibly an initial status message and expiration.
Create a new Job with the given API key, name, type and possibly an
initial status message and expiration. If a started time is provided, then
the job will be put in the Started state, otherwise it will be in the
NotStarted state until start(...)
is run.
Moves the job to the Expired
terminal state.
Returns the Job with the given ID if it exists.
Moves the job to the Finished
terminal state, with the given value as
the result.
Returns just the latest status message.
Lists all channels that have had messages posted to them.
Lists all channels that have had messages posted to them. Note that
channels are created on a demand by addMessage
, so this is not a
definitive list of channels, just what existed at the time.
Returns a list of all currently running jobs
Returns all the messages posted to a job's channel since some specified message.
Returns all the messages posted to a job's channel since some specified message. If no previous message is given, then all messages posted to the given channel are returned.
Starts a job if it is in the NotStarted
state, otherwise an error string
is returned.
Updates a job's status to value
.
Updates a job's status to value
. If a prevStatus
is provided, then
this must match the current status in order for the update to succeed,
otherwise the update fails and the actual current status is returned.