mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-25 10:57:41 +02:00
BackgroundDaemon: log reload and make some...
...methods public
This commit is contained in:
parent
6736e3296e
commit
6cd50fb392
@ -131,6 +131,22 @@ class BackgroundDaemon
|
|||||||
return $systemd;
|
return $systemd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return DaemonProcessDetails
|
||||||
|
*/
|
||||||
|
public function getProcessDetails()
|
||||||
|
{
|
||||||
|
return $this->processDetails;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return DaemonProcessState
|
||||||
|
*/
|
||||||
|
public function getProcessState()
|
||||||
|
{
|
||||||
|
return $this->processState;
|
||||||
|
}
|
||||||
|
|
||||||
protected function initializeDb(
|
protected function initializeDb(
|
||||||
DaemonProcessDetails $processDetails,
|
DaemonProcessDetails $processDetails,
|
||||||
DaemonProcessState $processState,
|
DaemonProcessState $processState,
|
||||||
@ -178,13 +194,14 @@ class BackgroundDaemon
|
|||||||
$this->shutdown();
|
$this->shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function reload()
|
public function reload()
|
||||||
{
|
{
|
||||||
if ($this->reloading) {
|
if ($this->reloading) {
|
||||||
Logger::error('Ignoring reload request, reload is already in progress');
|
Logger::error('Ignoring reload request, reload is already in progress');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->reloading = true;
|
$this->reloading = true;
|
||||||
|
Logger::info('Going gown for reload now');
|
||||||
$this->setState('reloading the main process');
|
$this->setState('reloading the main process');
|
||||||
$this->daemonDb->disconnect()->then(function () {
|
$this->daemonDb->disconnect()->then(function () {
|
||||||
Process::restart();
|
Process::restart();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user