(options: QueueOptions, jobs: Jobs = {})
| 47 | } |
| 48 | export class Queue extends EventEmitter { |
| 49 | constructor(options: QueueOptions, jobs: Jobs = {}) { |
| 50 | super(); |
| 51 | |
| 52 | this.options = options; |
| 53 | this.jobs = jobs; |
| 54 | |
| 55 | this.connection = new Connection(options.connection); |
| 56 | this.connection.on("error", (error) => { |
| 57 | this.emit("error", error); |
| 58 | }); |
| 59 | } |
| 60 | |
| 61 | async connect() { |
| 62 | return this.connection.connect(); |