IA logging, BH restart
This commit is contained in:
parent
e470a98f69
commit
da82aa9fc5
|
|
@ -31,6 +31,8 @@ class RestartServer extends Command
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
\Log::channel('websocket')->info('WebSocket restart server command called ...');
|
||||||
|
|
||||||
Cache::forever(
|
Cache::forever(
|
||||||
'blax:websockets:restart',
|
'blax:websockets:restart',
|
||||||
$this->currentTime()
|
$this->currentTime()
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,10 @@ class StartServer extends Command
|
||||||
$this->lastRestart = $this->getLastRestart();
|
$this->lastRestart = $this->getLastRestart();
|
||||||
|
|
||||||
$this->loop->addPeriodicTimer(10, function () {
|
$this->loop->addPeriodicTimer(10, function () {
|
||||||
if ($this->getLastRestart() !== $this->lastRestart) {
|
if (
|
||||||
|
($this->getLastRestart() . '')
|
||||||
|
!== ($this->lastRestart . '')
|
||||||
|
) {
|
||||||
\Log::channel('websocket')->info('Restart detected, triggering soft shutdown...', [
|
\Log::channel('websocket')->info('Restart detected, triggering soft shutdown...', [
|
||||||
'previous_restart' => $this->lastRestart,
|
'previous_restart' => $this->lastRestart,
|
||||||
'current_restart' => $this->getLastRestart(),
|
'current_restart' => $this->getLastRestart(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue