Queue
Uses
Properties
$connectionName string
The connection name for the queue.
$dispatchAfterCommit
Indicates that jobs should be dispatched after all database transactions have committed.
$createPayloadCallbacks callable[]
The create payload callbacks.
Methods
pushOn ( $queue , $job , $data ) : mixed
Push a new job onto the queue.
Parameters
- $queue string
- $job string
- $data mixed
laterOn ( $queue , $delay , $job , $data ) : mixed
Push a new job onto the queue after a delay.
Parameters
- $queue string
- $delay DateTimeInterface |DateInterval |int
- $job string
- $data mixed
bulk ( $jobs , $data , $queue ) : void
Push an array of jobs onto the queue.
Parameters
- $jobs array
- $data mixed
- $queue string|null
createPayload ( $job , $queue , $data ) : string
Create a payload string from the given job and data.
Parameters
- $job Closure |string|object
- $queue string
- $data mixed
createPayloadArray ( $job , $queue , $data ) : array
Create a payload array from the given job and data.
Parameters
- $job string|object
- $queue string
- $data mixed
createObjectPayload ( $job , $queue ) : array
Create a payload for an object-based queue handler.
Parameters
- $job object
- $queue string
getDisplayName ( $job ) : string
Get the display name for the given job.
Parameters
- $job object
getJobBackoff ( $job ) : mixed
Get the backoff for an object-based queue handler.
Parameters
- $job mixed
getJobExpiration ( $job ) : mixed
Get the expiration timestamp for an object-based queue handler.
Parameters
- $job mixed
jobShouldBeEncrypted ( $job ) : bool
Determine if the job should be encrypted.
Parameters
- $job object
createStringPayload ( $job , $queue , $data ) : array
Create a typical, string based queue payload array.
Parameters
- $job string
- $queue string
- $data mixed
createPayloadUsing ( $callback ) : void
Register a callback to be executed when creating job payloads.
Parameters
- $callback callable|null
withCreatePayloadHooks ( $queue , array $payload ) : array
Create the given payload using any registered payload hooks.
Parameters
- $queue string
- $payload array
enqueueUsing ( $job , $payload , $queue , $delay , $callback ) : mixed
Enqueue a job using the given callback.
Parameters
- $job Closure |string|object
- $payload string
- $queue string
- $delay DateTimeInterface |DateInterval |int|null
- $callback callable
shouldDispatchAfterCommit ( $job ) : bool
Determine if the job should be dispatched after all database transactions have committed.
Parameters
- $job Closure |string|object
raiseJobQueuedEvent ( $jobId , $job ) : void
Raise the job queued event.
Parameters
- $jobId string|int|null
- $job Closure |string|object
getConnectionName ( ) : string
Get the connection name for the queue.
setConnectionName ( $name ) : $this
Set the connection name for the queue.
Parameters
- $name string