(id: number)
| 374 | describe("failed job managment", () => { |
| 375 | beforeEach(async () => { |
| 376 | const errorPayload = function (id: number) { |
| 377 | return JSON.stringify({ |
| 378 | worker: "busted-worker-" + id, |
| 379 | queue: "busted-queue", |
| 380 | payload: { |
| 381 | class: "busted_job", |
| 382 | queue: "busted-queue", |
| 383 | args: [1, 2, 3], |
| 384 | }, |
| 385 | exception: "ERROR_NAME", |
| 386 | error: "I broke", |
| 387 | failed_at: new Date().toString(), |
| 388 | }); |
| 389 | }; |
| 390 | |
| 391 | await queue.connection.redis.rpush( |
| 392 | queue.connection.key("failed"), |