class Release (View source)

Methods

__construct(bool $release = false, int $releaseAfter = 0)

No description

static Release
when(Closure|bool $condition, int $releaseAfter = 0)

Release the job back onto the queue if the given condition is truthy.

static Release
unless(Closure|bool $condition, int $releaseAfter = 0)

Release the job back onto the queue unless the given condition is truthy.

mixed
handle(mixed $job, callable $next)

Handle the job.

Details

__construct(bool $release = false, int $releaseAfter = 0)

No description

Parameters

bool $release

Whether the job should be released back onto the queue.

int $releaseAfter

The number of seconds before the job is available again.

static Release when(Closure|bool $condition, int $releaseAfter = 0)

Release the job back onto the queue if the given condition is truthy.

Parameters

Closure|bool $condition
int $releaseAfter

The number of seconds before the job is available again.

Return Value

Release

static Release unless(Closure|bool $condition, int $releaseAfter = 0)

Release the job back onto the queue unless the given condition is truthy.

Parameters

Closure|bool $condition
int $releaseAfter

The number of seconds before the job is available again.

Return Value

Release

mixed handle(mixed $job, callable $next)

Handle the job.

Parameters

mixed $job
callable $next

Return Value

mixed