* - `timestamps` is an array of integers for all timestamps which have at least one job scheduled in the future
()
| 319 | * - `timestamps` is an array of integers for all timestamps which have at least one job scheduled in the future |
| 320 | */ |
| 321 | async timestamps() { |
| 322 | const results: number[] = []; |
| 323 | const timestamps = await this.connection.getKeys( |
| 324 | this.connection.key("delayed:*"), |
| 325 | ); |
| 326 | timestamps.forEach((timestamp) => { |
| 327 | const parts = timestamp.split(":"); |
| 328 | results.push(parseInt(parts[parts.length - 1]) * 1000); |
| 329 | }); |
| 330 | |
| 331 | results.sort(); |
| 332 | return results; |
| 333 | } |
| 334 | |
| 335 | /** |
| 336 | * - `jobsEnqueuedForThisTimestamp` is an array, matching the style of the response of `queue.queued` |