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

Method cleanJobsInSet

php/src/Scripts.php:430–448  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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.

Callers 1

cleanMethod · 0.45

Calls 2

toKeyMethod · 0.95
execScriptMethod · 0.95

Tested by

no test coverage detected