IA logging, BH restart

This commit is contained in:
Fabian @ Blax Software 2025-12-11 11:31:14 +01:00
parent e470a98f69
commit da82aa9fc5
2 changed files with 6 additions and 1 deletions

View File

@ -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()

View File

@ -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(),