mirror of https://github.com/MISP/MISP
chg: reload conf
parent
55e9238b46
commit
accc6bb9b4
|
@ -14,6 +14,8 @@ class MonitorWorkersShell extends AppShell
|
|||
|
||||
private const DEFAULT_SLEEP_INTERVAL = 5; // seconds
|
||||
|
||||
public $tasks = ['ConfigLoad'];
|
||||
|
||||
public function initialize(): void
|
||||
{
|
||||
parent::initialize();
|
||||
|
@ -41,6 +43,7 @@ class MonitorWorkersShell extends AppShell
|
|||
CakeLog::info("[WORKERS MONITOR] - starting to monitor workers...");
|
||||
|
||||
while (true) {
|
||||
$this->ConfigLoad->execute();
|
||||
$this->checkWorkersProcessStatus($this->BackgroundJobsTool->getWorkers());
|
||||
|
||||
sleep($this->sleepInterval);
|
||||
|
|
|
@ -21,6 +21,7 @@ class StartWorkerShell extends AppShell
|
|||
private const DEFAULT_SLEEP_INTERVAL = 5; // seconds
|
||||
private const DEFAULT_MAX_EXECUTION_TIME = 86400; // 1 day
|
||||
|
||||
public $tasks = ['ConfigLoad'];
|
||||
|
||||
public function initialize(): void
|
||||
{
|
||||
|
@ -76,6 +77,7 @@ class StartWorkerShell extends AppShell
|
|||
$this->BackgroundJobsTool->registerWorker($this->worker);
|
||||
|
||||
while (true) {
|
||||
$this->ConfigLoad->execute();
|
||||
$this->checkMaxExecutionTime();
|
||||
|
||||
$job = $this->BackgroundJobsTool->dequeue($this->worker->queue());
|
||||
|
|
Loading…
Reference in New Issue