35 |
console.log('Queue created: ', this.constructor.name, this.id); |
console.log('Queue created: ', this.constructor.name, this.id); |
36 |
} |
} |
37 |
|
|
38 |
|
get data() { |
39 |
|
return this.model.data; |
40 |
|
} |
41 |
|
|
42 |
async finish() { |
async finish() { |
43 |
this.client.queueManager.removeQueue(this); |
this.client.queueManager.removeQueue(this); |
44 |
console.log("Job complete: ", this.constructor.name); |
console.log("Job complete: ", this.constructor.name); |
47 |
async cancel() { |
async cancel() { |
48 |
clearTimeout(this.timeout); |
clearTimeout(this.timeout); |
49 |
await this.model.delete(); |
await this.model.delete(); |
50 |
|
this.client.queueManager.removeQueue(this); |
51 |
} |
} |
52 |
|
|
53 |
abstract execute(data?: { [key: string | number]: any }): Promise<any>; |
abstract execute(data?: { [key: string | number]: any }): Promise<any>; |