Repository navigation
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. |
Answered by
victor-david
Apr 26, 2025
Replies: 1 comment
|
Figured it out. I needed to restart supervisor, which was running the worker. Now it fails as expected. |
0 replies
Answer selected by
victor-david
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Figured it out. I needed to restart supervisor, which was running the worker. Now it fails as expected.