class QueuedClosure

Properties

Closure $closure

The underlying Closure.

string|null $connection

The name of the connection the job should be sent to.

string|null $queue

The name of the queue the job should be sent to.

int|string|null $messageGroup

The job "group" the job should be sent to.

null|callable $deduplicator

The job deduplicator callback the job should use to generate the deduplication ID.

DateTimeInterface|DateInterval|int|null $delay

The number of seconds before the job should be made available.

array $catchCallbacks

All of the "catch" callbacks for the queued closure.

Methods

__construct(Closure $closure)

Create a new queued closure event listener resolver.

onConnection(UnitEnum|string|null $connection)

Set the desired connection for the job.

onQueue(UnitEnum|string|null $queue)

Set the desired queue for the job.

onGroup(UnitEnum|string $group)

Set the desired job "group".

withDeduplicator(callable|null $deduplicator)

Set the desired job deduplicator callback.

delay(DateTimeInterface|DateInterval|int|null $delay)

Set the desired delay in seconds for the job.

catch(Closure $closure)

Specify a callback that should be invoked if the queued listener job fails.

resolve()

Resolve the actual event listener callback.

Details

at line 58
__construct(Closure $closure)

Create a new queued closure event listener resolver.

Parameters

Closure $closure

at line 66
QueuedClosure onConnection(UnitEnum|string|null $connection)

Set the desired connection for the job.

Parameters

UnitEnum|string|null $connection

Return Value

QueuedClosure

at line 78
QueuedClosure onQueue(UnitEnum|string|null $queue)

Set the desired queue for the job.

Parameters

UnitEnum|string|null $queue

Return Value

QueuedClosure

at line 92
QueuedClosure onGroup(UnitEnum|string $group)

Set the desired job "group".

This feature is only supported by some queues, such as Amazon SQS.

Parameters

UnitEnum|string $group

Return Value

QueuedClosure

at line 104
QueuedClosure withDeduplicator(callable|null $deduplicator)

Set the desired job deduplicator callback.

This feature is only supported by some queues, such as Amazon SQS FIFO.

Parameters

callable|null $deduplicator

Return Value

QueuedClosure

at line 116
QueuedClosure delay(DateTimeInterface|DateInterval|int|null $delay)

Set the desired delay in seconds for the job.

Parameters

DateTimeInterface|DateInterval|int|null $delay

Return Value

QueuedClosure

at line 126
QueuedClosure catch(Closure $closure)

Specify a callback that should be invoked if the queued listener job fails.

Parameters

Closure $closure

Return Value

QueuedClosure

at line 136
Closure resolve()

Resolve the actual event listener callback.

Return Value

Closure