Many changes.
This commit is contained in:
parent
dc02826079
commit
13ad2b0ef8
15 changed files with 148 additions and 178 deletions
|
@ -4,20 +4,27 @@
|
|||
|
||||
final class JobStatus
|
||||
{
|
||||
/**
|
||||
* The Job is waiting to be picked up by a worker.
|
||||
* Processing Mode
|
||||
*/
|
||||
public const WAITING = 10;
|
||||
|
||||
/**
|
||||
* The Job is currently being processed by a worker.
|
||||
* Processing Mode
|
||||
*/
|
||||
public const PROCESSING = 20;
|
||||
|
||||
/**
|
||||
* The Job has been finished by a worker.
|
||||
* Finished Mode
|
||||
*/
|
||||
public const FINISHED = 30;
|
||||
|
||||
/**
|
||||
* The Job has failed to be processed by a worker.
|
||||
* Finished Mode
|
||||
*/
|
||||
public const FAILED = 40;
|
||||
public const REJECTED = 50;
|
||||
|
||||
public const PROCESSING_STATES = [
|
||||
self::WAITING,
|
||||
self::PROCESSING,
|
||||
self::REJECTED // This is a special case, as the job gets pushed back into the queue for reprocessing.
|
||||
];
|
||||
|
||||
public const FINISHED_STATES = [
|
||||
self::FINISHED,
|
||||
self::FAILED,
|
||||
];
|
||||
}
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
public const WORKER = 'worker';
|
||||
|
||||
public const NONE = 'none';
|
||||
|
||||
public const ALL = [
|
||||
self::CLIENT,
|
||||
self::WORKER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue