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

Method delayedAt

src/core/queue.ts:338–349  ·  view source on GitHub ↗

* - `jobsEnqueuedForThisTimestamp` is an array, matching the style of the response of `queue.queued`

(timestamp: number)

Source from the content-addressed store, hash-verified

336 * - `jobsEnqueuedForThisTimestamp` is an array, matching the style of the response of `queue.queued`
337 */
338 async delayedAt(timestamp: number) {
339 const rTimestamp = Math.round(timestamp / 1000); // assume timestamp is in ms
340 const items = await this.connection.redis.lrange(
341 this.connection.key("delayed:" + rTimestamp),
342 0,
343 -1,
344 );
345 const tasks = items.map((i) => {
346 return JSON.parse(i) as ParsedJob;
347 });
348 return { tasks, rTimestamp };
349 }
350
351 /**
352 * - list all the jobs (with their payloads) in a queue between start index and stop index.

Callers 2

allDelayedMethod · 0.95
queue.tsFile · 0.80

Calls 1

keyMethod · 0.45

Tested by

no test coverage detected