master

laravel/framework

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

JobProcessed.php

TLDR

The JobProcessed.php file defines a JobProcessed class in the Illuminate\Queue\Events namespace. This class represents an event that is fired when a job is successfully processed. It contains properties for the connection name and job instance.

Classes

JobProcessed

The JobProcessed class represents an event that is fired when a job is successfully processed. It contains the following properties:

  • $connectionName: The connection name where the job was processed.
  • $job: The job instance that was processed.

The class has a constructor method that takes the connection name and job instance as parameters and sets the corresponding properties.

<?php

namespace Illuminate\Queue\Events;

class JobProcessed
{
    /**
     * 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;
    }
}