class Release

Methods

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

Create a new middleware instance.

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

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

Create a new middleware instance.

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

at line 28
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

Return Value

Release

at line 38
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

Return Value

Release

at line 46
mixed handle(mixed $job, callable $next)

Handle the job.

Parameters

mixed $job
callable $next

Return Value

mixed