master

laravel/framework

Last updated at: 29/12/2023 09:25

JobTimedOut.php

TLDR

This file defines the JobTimedOut class in the Illuminate\Queue\Events namespace.

Classes

JobTimedOut

The JobTimedOut class represents an event that is triggered when a job times out. It contains two properties:

  • $connectionName: The name of the connection that the job was processed on.
  • $job: The instance of the job that timed out.

The class has a constructor that accepts the connection name and the job instance as parameters and assigns them to the respective properties.

<?php

namespace Illuminate\Queue\Events;

class JobTimedOut
{
    /**
     * The connection name.
     *
     * @var string
     */
    public $connectionName;

    /**
     * The job instance.
     *
     * @var \Illuminate\Contracts\Queue\Job
     */
    public $job;

    /**
     * Create a new event instance.
     *
     * @param  string  $connectionName
     * @param  \Illuminate\Contracts\Queue\Job  $job
     * @return void
     */
    public function __construct($connectionName, $job)
    {
        $this->job = $job;
        $this->connectionName = $connectionName;
    }
}