MCPcopy Create free account
hub / github.com/actionhero/node-resque / allDelayed

Method allDelayed

src/core/queue.ts:371–382  ·  view source on GitHub ↗

* - jobsHash is an object with its keys being timestamps, and the values are arrays of jobs at each time. * - note that this operation can be very slow and very ram-heavy

()

Source from the content-addressed store, hash-verified

369 * - note that this operation can be very slow and very ram-heavy
370 */
371 async allDelayed() {
372 const results: { [key: string]: any[] } = {};
373
374 const timestamps = await this.timestamps();
375 for (const i in timestamps) {
376 const timestamp = timestamps[i];
377 const { tasks, rTimestamp } = await this.delayedAt(timestamp);
378 results[(rTimestamp * 1000).toString(10)] = tasks;
379 }
380
381 return results;
382 }
383
384 /**
385 * - types of locks include queue and worker locks, as created by the plugins below

Callers 1

queue.tsFile · 0.80

Calls 2

timestampsMethod · 0.95
delayedAtMethod · 0.95

Tested by

no test coverage detected