Neuron-PHP

WorkerStoppedEvent
in package
implements IEvent

Event fired when a queue worker stops processing jobs.

This event is triggered when a worker gracefully shuts down or crashes, allowing for cleanup operations and worker pool monitoring.

Use cases:

  • Monitor worker crashes and unexpected shutdowns
  • Track worker uptime and operational metrics
  • Alert when worker pool drops below healthy threshold
  • Log worker shutdown reasons for debugging
  • Update monitoring dashboards with active worker count
  • Trigger worker restart or replacement procedures

Table of Contents

Interfaces

IEvent
Core event interface for the Neuron event system.

Properties

$totalJobsProcessed  : int
$workerId  : string

Methods

__construct()  : mixed
getName()  : string

Properties

Methods

__construct()

public __construct(string $workerId, int $totalJobsProcessed) : mixed
Parameters
$workerId : string

Unique identifier for this worker instance

$totalJobsProcessed : int

Total number of jobs processed by this worker


        
On this page

Search results