From aef10a5f80ca08b7050111f311f60a6da33de89e Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 29 Sep 2019 08:52:13 +0200 Subject: [PATCH] BackgroundDaemon: set first ready, then running --- library/Director/Daemon/BackgroundDaemon.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/library/Director/Daemon/BackgroundDaemon.php b/library/Director/Daemon/BackgroundDaemon.php index c4cfd7f5..028dc296 100644 --- a/library/Director/Daemon/BackgroundDaemon.php +++ b/library/Director/Daemon/BackgroundDaemon.php @@ -76,6 +76,10 @@ class BackgroundDaemon $this->jobRunner = new JobRunner($this->loop); $this->systemd = $this->eventuallyInitializeSystemd(); $this->processState->setSystemd($this->systemd); + if ($this->systemd) { + $this->systemd->setReady(); + } + $this->setState('ready'); $this->processDetails = $this ->initializeProcessDetails($this->systemd) ->registerProcessList($this->jobRunner->getProcessList()); @@ -90,9 +94,7 @@ class BackgroundDaemon ->register($this->jobRunner) ->register($this->logProxy) ->run($this->loop); - if ($this->systemd) { - $this->systemd->setReady(); - } + $this->setState('running'); } /**