diff --git a/src/Listeners/MonitorMasterSupervisorMemory.php b/src/Listeners/MonitorMasterSupervisorMemory.php index 14e92e42..ebf1582f 100644 --- a/src/Listeners/MonitorMasterSupervisorMemory.php +++ b/src/Listeners/MonitorMasterSupervisorMemory.php @@ -18,9 +18,9 @@ public function handle(MasterSupervisorLooped $event) $master = $event->master; if ($master->memoryUsage() > config('horizon.memory_limit', 64)) { - $master->terminate(12); - event(new MasterSupervisorOutOfMemory($master)); + + $master->terminate(12); } } } diff --git a/src/Listeners/MonitorSupervisorMemory.php b/src/Listeners/MonitorSupervisorMemory.php index 811e2063..605c5627 100644 --- a/src/Listeners/MonitorSupervisorMemory.php +++ b/src/Listeners/MonitorSupervisorMemory.php @@ -18,9 +18,9 @@ public function handle(SupervisorLooped $event) $supervisor = $event->supervisor; if ($supervisor->memoryUsage() > $supervisor->options->memory) { - $supervisor->terminate(12); - event(new SupervisorOutOfMemory($supervisor)); + + $supervisor->terminate(12); } } }