* Clean jobs from a set. * * @param string $type * @param int $grace Time in milliseconds * @param int $limit Maximum number of jobs to clean * @return array Job IDs that were cleaned */
(string $type, int $grace = 0, int $limit = 0)
| 428 | * @return array<string> Job IDs that were cleaned |
| 429 | */ |
| 430 | public function cleanJobsInSet(string $type, int $grace = 0, int $limit = 0): array |
| 431 | { |
| 432 | $keys = [ |
| 433 | $this->toKey($type), |
| 434 | $this->keys['events'], |
| 435 | $this->keys['repeat'], |
| 436 | ]; |
| 437 | |
| 438 | $args = [ |
| 439 | $this->keys[''], |
| 440 | (int)(microtime(true) * 1000) - $grace, |
| 441 | $limit, |
| 442 | $type, |
| 443 | ]; |
| 444 | |
| 445 | $result = $this->execScript('cleanJobsInSet-3.lua', $keys, $args); |
| 446 | |
| 447 | return is_array($result) ? $result : []; |
| 448 | } |
| 449 | |
| 450 | /** |
| 451 | * Obliterate (completely destroy) the queue. |
no test coverage detected