From 307ad82c5354140fd57552db8e0660f4d1fdff0f Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Wed, 14 Feb 2024 16:15:39 +1100 Subject: [PATCH] Wip --- src/Commands/CheckCommand.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Commands/CheckCommand.php b/src/Commands/CheckCommand.php index 05b18d14..442313b2 100644 --- a/src/Commands/CheckCommand.php +++ b/src/Commands/CheckCommand.php @@ -51,17 +51,17 @@ public function handle( $instance = Str::random(); while (true) { + $now = CarbonImmutable::now(); + if ($lastRestart !== $cache->store()->get('laravel:pulse:restart')) { return self::SUCCESS; } - $now = CarbonImmutable::now(); - if ($lock?->get()) { - $pulse->rescue(fn () => $event->dispatch(new IsolatedBeat($now))); + $event->dispatch(new IsolatedBeat($now)); } - $pulse->rescue(fn () => $event->dispatch(new SharedBeat($now, $instance))); + $event->dispatch(new SharedBeat($now, $instance)); $pulse->ingest();