Lots of changes, implemented the base usage. Beware of bugs and unfinished states
This commit is contained in:
parent
0c23fdfac2
commit
f20551857b
27 changed files with 3045 additions and 71 deletions
11
src/TamerLib/Enums/EncodingType.php
Normal file
11
src/TamerLib/Enums/EncodingType.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace TamerLib\Enums;
|
||||
|
||||
final class EncodingType
|
||||
{
|
||||
public const CLOSURE_POINTER = 0;
|
||||
|
||||
public const SERIALIZED = 100;
|
||||
|
||||
}
|
23
src/TamerLib/Enums/JobStatus.php
Normal file
23
src/TamerLib/Enums/JobStatus.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace TamerLib\Enums;
|
||||
|
||||
final class JobStatus
|
||||
{
|
||||
public const WAITING = 10;
|
||||
public const PROCESSING = 20;
|
||||
public const FINISHED = 30;
|
||||
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,
|
||||
];
|
||||
}
|
10
src/TamerLib/Enums/JobType.php
Normal file
10
src/TamerLib/Enums/JobType.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace TamerLib\Enums;
|
||||
|
||||
final class JobType
|
||||
{
|
||||
public const CLOSURE = 100;
|
||||
|
||||
public const FUNCTION = 200;
|
||||
}
|
15
src/TamerLib/Enums/TamerMode.php
Normal file
15
src/TamerLib/Enums/TamerMode.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace TamerLib\Enums;
|
||||
|
||||
final class TamerMode
|
||||
{
|
||||
public const CLIENT = 'client';
|
||||
|
||||
public const WORKER = 'worker';
|
||||
|
||||
public const ALL = [
|
||||
self::CLIENT,
|
||||
self::WORKER
|
||||
];
|
||||
}
|
9
src/TamerLib/Enums/WorkerType.php
Normal file
9
src/TamerLib/Enums/WorkerType.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace TamerLib\Enums;
|
||||
|
||||
final class WorkerType
|
||||
{
|
||||
public const SCRIPT = 10;
|
||||
public const CLOSURE = 20;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue