Lots of changes, implemented the base usage. Beware of bugs and unfinished states

This commit is contained in:
Netkas 2023-06-12 21:32:35 -04:00
parent 0c23fdfac2
commit f20551857b
No known key found for this signature in database
GPG key ID: 5DAF58535614062B
27 changed files with 3045 additions and 71 deletions

View file

@ -0,0 +1,11 @@
<?php
namespace TamerLib\Enums;
final class EncodingType
{
public const CLOSURE_POINTER = 0;
public const SERIALIZED = 100;
}

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

View file

@ -0,0 +1,10 @@
<?php
namespace TamerLib\Enums;
final class JobType
{
public const CLOSURE = 100;
public const FUNCTION = 200;
}

View 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
];
}

View file

@ -0,0 +1,9 @@
<?php
namespace TamerLib\Enums;
final class WorkerType
{
public const SCRIPT = 10;
public const CLOSURE = 20;
}