Many changes.

This commit is contained in:
Netkas 2023-06-16 03:38:51 -04:00
parent dc02826079
commit 13ad2b0ef8
No known key found for this signature in database
GPG key ID: 5DAF58535614062B
15 changed files with 148 additions and 178 deletions

View file

@ -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,
];
}

View file

@ -8,6 +8,8 @@
public const WORKER = 'worker';
public const NONE = 'none';
public const ALL = [
self::CLIENT,
self::WORKER