(redisConnection?: IORedis.Redis)
| 20 | } |
| 21 | |
| 22 | init(redisConnection?: IORedis.Redis): void { |
| 23 | if (this.jobQueue !== undefined || !redisConnection) { |
| 24 | return; |
| 25 | } |
| 26 | |
| 27 | this.jobQueue = new Queue(this.queueName, { |
| 28 | ...this.queueOpts, |
| 29 | connection: redisConnection as ConnectionOptions, |
| 30 | }); |
| 31 | |
| 32 | this._queueScheduler = new QueueScheduler(this.queueName, { |
| 33 | connection: redisConnection as ConnectionOptions, |
| 34 | }); |
| 35 | } |
| 36 | |
| 37 | async add(taskName: string, task: T, jobOpts?: JobsOptions): Promise<void> { |
| 38 | if (this.jobQueue === undefined) { |
no outgoing calls
no test coverage detected