Failed event listener not failing #55566
-
Hi. According to the docs:
Yet, my class SendSubscribeNotice implements ShouldQueue
{
// use InteractsWithQueue; // have tried with and without this
public $delay = 15;
public $tries = 3;
public $backoff = 15;
public function handle(Subscribe $event): void
{
throw new \Exception('Throw for test');
Log::info("Subscriber signed up. Name: {$event->subscriber->name} Email: {$event->subscriber->email}");
}
public function failed(Subscribe $event, Throwable $exception): void
{
Log::error('Failed ' . $exception->getMessage());
}
} Despite that I throw an exception in the Would like to be able to know if the listener fails. but not sure what I need to do differently. Any guidance appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Figured it out. I needed to restart supervisor, which was running the worker. Now it fails as expected. |
Beta Was this translation helpful? Give feedback.
Figured it out. I needed to restart supervisor, which was running the worker. Now it fails as expected.