diff --git a/app/Console/Command/StartWorkerShell.php b/app/Console/Command/StartWorkerShell.php index 7be815aa4..37fbc3ea6 100644 --- a/app/Console/Command/StartWorkerShell.php +++ b/app/Console/Command/StartWorkerShell.php @@ -15,7 +15,7 @@ class StartWorkerShell extends AppShell /** @var int */ private $maxExecutionTime; - private const DEFAULT_MAX_EXECUTION_TIME = 86400; // 1 day + const DEFAULT_MAX_EXECUTION_TIME = 86400; // 1 day public function initialize(): void { diff --git a/app/Lib/Tools/BackgroundJobs/BackgroundJob.php b/app/Lib/Tools/BackgroundJobs/BackgroundJob.php index 5bb39008d..1b5ece53c 100644 --- a/app/Lib/Tools/BackgroundJobs/BackgroundJob.php +++ b/app/Lib/Tools/BackgroundJobs/BackgroundJob.php @@ -4,7 +4,7 @@ declare(strict_types=1); class BackgroundJob implements JsonSerializable { - public const + const STATUS_WAITING = 1, STATUS_RUNNING = 2, STATUS_FAILED = 3, diff --git a/app/Lib/Tools/BackgroundJobs/Worker.php b/app/Lib/Tools/BackgroundJobs/Worker.php index 232957ec7..367751673 100644 --- a/app/Lib/Tools/BackgroundJobs/Worker.php +++ b/app/Lib/Tools/BackgroundJobs/Worker.php @@ -38,7 +38,7 @@ class Worker implements JsonSerializable */ private $status; - public const + const STATUS_RUNNING = 1, STATUS_FAILED = 2, STATUS_UNKNOWN = 3; diff --git a/app/Lib/Tools/BackgroundJobsTool.php b/app/Lib/Tools/BackgroundJobsTool.php index 42977ad56..02cae2a6f 100644 --- a/app/Lib/Tools/BackgroundJobsTool.php +++ b/app/Lib/Tools/BackgroundJobsTool.php @@ -44,23 +44,23 @@ class BackgroundJobsTool /** @var \Supervisor\Supervisor */ private $Supervisor; - public const MISP_WORKERS_PROCESS_GROUP = 'misp-workers'; + const MISP_WORKERS_PROCESS_GROUP = 'misp-workers'; - public const + const STATUS_RUNNING = 0, STATUS_NOT_ENABLED = 1, STATUS_REDIS_NOT_OK = 2, STATUS_SUPERVISOR_NOT_OK = 3, STATUS_REDIS_AND_SUPERVISOR_NOT_OK = 4; - public const + const DEFAULT_QUEUE = 'default', EMAIL_QUEUE = 'email', CACHE_QUEUE = 'cache', PRIO_QUEUE = 'prio', UPDATE_QUEUE = 'update'; - public const VALID_QUEUES = [ + const VALID_QUEUES = [ self::DEFAULT_QUEUE, self::EMAIL_QUEUE, self::CACHE_QUEUE, @@ -68,24 +68,24 @@ class BackgroundJobsTool self::UPDATE_QUEUE, ]; - public const + const CMD_EVENT = 'event', CMD_SERVER = 'server', CMD_ADMIN = 'admin'; - public const ALLOWED_COMMANDS = [ + const ALLOWED_COMMANDS = [ self::CMD_EVENT, self::CMD_SERVER, self::CMD_ADMIN ]; - public const CMD_TO_SHELL_DICT = [ + const CMD_TO_SHELL_DICT = [ self::CMD_EVENT => 'EventShell', self::CMD_SERVER => 'ServerShell', self::CMD_ADMIN => 'AdminShell' ]; - public const JOB_STATUS_PREFIX = 'job_status'; + const JOB_STATUS_PREFIX = 'job_status'; /** @var array */ private $settings;