BackgroundDaemon: set first ready, then running

This commit is contained in:
Thomas Gelf 2019-09-29 08:52:13 +02:00
parent ab8c8b041d
commit aef10a5f80

View File

@ -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');
}
/**