* 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)
| 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. |
nothing calls this directly
no test coverage detected