JobFailedEvent
in package
implements
IEvent
Event fired when a job fails with an exception.
This event is triggered when a job's run() method throws an exception. The job may be retried depending on the retry configuration.
Use cases:
- Alert on job failures for immediate attention
- Track error patterns and failure rates
- Log detailed exception information for debugging
- Trigger fallback or compensation logic
- Send notifications to development team
- Update monitoring dashboards with failure metrics
Table of Contents
Interfaces
- IEvent
- Core event interface for the Neuron event system.
Properties
- $arguments : array<string|int, mixed>
- $attempts : int
- $exception : Throwable
- $jobClass : string
- $queue : string
Methods
- __construct() : mixed
- getName() : string
Properties
$arguments read-only
public
array<string|int, mixed>
$arguments
$attempts read-only
public
int
$attempts
$exception read-only
public
Throwable
$exception
$jobClass read-only
public
string
$jobClass
$queue read-only
public
string
$queue
Methods
__construct()
public
__construct(string $jobClass, array<string|int, mixed> $arguments, string $queue, Throwable $exception, int $attempts) : mixed
Parameters
- $jobClass : string
-
Fully qualified class name of the job
- $arguments : array<string|int, mixed>
-
Arguments passed to the job
- $queue : string
-
Queue name where job failed
- $exception : Throwable
-
The exception that caused the failure
- $attempts : int
-
Number of attempts made so far
getName()
public
getName() : string