A Job represents a piece of work to be run in the background, i.e. outside the request-response cycle.
It is intended to be used for long-running work triggered by API requests. Jobs should now generally
be directly instantiated. Rather, the JobQueue add() method should be used to create and
add a new Job to a queue.
number | string | nullstringnumberDatestringTJobStatenumberanyanybooleanDate | undefinedDate | undefinednumbernumber() => Calling this signifies that the job work has started. This method should be
called in the JobQueueStrategy next() method.
(percent: number) => Sets the progress (0 - 100) of the job.
(result?: any) => Calling this method signifies that the job succeeded. The result
will be stored in the Job.result property.
(err?: any) => Calling this method signifies that the job failed.
() => () => Sets a RUNNING job back to PENDING. Should be used when the JobQueue is being destroyed before the job has been completed.
(eventType: JobEventType, listener: JobEventListener<T>) => Used to register event handler for job events
(eventType: JobEventType, listener: JobEventListener<T>) => An event raised by a Job.
The signature of the event handler expected by the Job.on() method.