-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
types.ts
34 lines (31 loc) · 875 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
export { Worker, Plugins, Scheduler, Queue } from "node-resque"
export type { RedisConnections } from '@adonisjs/redis/types'
import { Plugin } from "node-resque"
import BaseJob from "./base_job.js"
import { defineConfig } from "./define_config.js"
export type ResqueConfig = ReturnType<typeof defineConfig>
export interface NodeResqueJob {
perform(..._args: any[]): any
job: BaseJob
plugins: typeof Plugin[],
pluginOptions: Record<string, any>
args?: any[]
}
export interface JobSchedule {
interval?: string | number
cron?: string
}
export interface ResqueFailure {
workerId?: number
queue: string
job: NodeResqueJob
failure: Error
duration: number
args: any[]
pluginOptions?: Record<string, any>
}
declare module '@adonisjs/core/types' {
interface EventsList {
'resque:failure': ResqueFailure
}
}