MCPcopy Create free account
hub / github.com/taskforcesh/bullmq / getRateLimitTtl

Method getRateLimitTtl

php/src/Scripts.php:529–537  ·  view source on GitHub ↗

* Get rate limit TTL. * * @param int|null $maxJobs * @return int TTL in milliseconds, -2 if key doesn't exist, -1 if no expire */

(?int $maxJobs = null)

Source from the content-addressed store, hash-verified

527 * @return int TTL in milliseconds, -2 if key doesn't exist, -1 if no expire
528 */
529 public function getRateLimitTtl(?int $maxJobs = null): int
530 {
531 $keys = [$this->keys['meta'], $this->keys['limiter']];
532 $args = $maxJobs !== null ? [$maxJobs] : [];
533
534 $result = $this->execScript('getRateLimitTtl-2.lua', $keys, $args);
535
536 return (int) $result;
537 }
538
539 /**
540 * Create an exception from an error code.

Callers

nothing calls this directly

Calls 1

execScriptMethod · 0.95

Tested by

no test coverage detected