Skip to content

Commit

Permalink
DaemonDb: emit 'connecting', fix event name
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Gelf committed Oct 12, 2019
1 parent f9c1326 commit 2c000d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions library/Director/Daemon/DaemonDb.php
Expand Up @@ -107,7 +107,7 @@ protected function onNewConfig($config)
} else {
Logger::error('DB configuration is no longer valid');
}
$this->emitStatus('there is no valid DB configuration');
$this->emitStatus('no configuration');
$this->dbConfig = $config;

return new FulfilledPromise();
Expand Down Expand Up @@ -136,6 +136,7 @@ protected function establishConnection($config)
$this->pendingReconnection->reset();
$this->pendingReconnection = null;
}
$this->emitStatus('connecting');

return $this->pendingReconnection = RetryUnless::succeeding($callback)
->setInterval(0.2)
Expand Down Expand Up @@ -286,7 +287,7 @@ public function disconnect()

protected function emitStatus($message, $level = 'info')
{
$this->emit('status', [$message, $level]);
$this->emit('state', [$message, $level]);

return $this;
}
Expand Down

0 comments on commit 2c000d4

Please sign in to comment.