RateLimited
class RateLimited
Properties
| protected RateLimiter | $limiter | The rate limiter instance. |
|
| protected string | $limiterName | The name of the rate limiter. |
|
| protected string|null | $storeName | The rate limiter store that should be used. |
|
| DateTimeInterface|int|null | $releaseAfter | The number of seconds before a job should be available again if the limit is exceeded. |
|
| bool | $shouldRelease | Indicates if the job should be released if the limit is exceeded. |
Methods
Create a new middleware instance.
Process the job.
Set the delay (in seconds) to release the job back to the queue.
Do not release the job back to the queue if the limit is exceeded.
Specify the rate limiter store that should be used.
Prepare the object for serialization.
Prepare the object after unserialization.
Details
at line 48
__construct(UnitEnum|string $limiterName)
Create a new middleware instance.
at line 59
mixed
handle(mixed $job, callable $next)
Process the job.
at line 86
protected mixed
handleJob(mixed $job, callable $next, array $limits, Limiter $limiter)
Handle a rate limited job.
at line 102
RateLimited
releaseAfter(DateTimeInterface|int $releaseAfter)
Set the delay (in seconds) to release the job back to the queue.
at line 112
RateLimited
dontRelease()
Do not release the job back to the queue if the limit is exceeded.
at line 124
RateLimited
store(UnitEnum|string $store)
Specify the rate limiter store that should be used.
at line 134
array
__sleep()
Prepare the object for serialization.
at line 147
void
__wakeup()
Prepare the object after unserialization.