import { ActionheroLogLevel } from "actionhero" ; import { MultiWorker , Queue , Scheduler } from "node-resque" ; const namespace = "tasks" ; declare module "actionhero" { export interface ActionheroConfigInterface { [ namespace ] : ReturnType < typeof DEFAULT [ typeof namespace ] > ; } } export const DEFAULT = { [ namespace ] : ( ) => { return { _toExpand : false , scheduler : false , queues : [ "*" ] as string [ ] | ( ( ) => Promise < string [ ] > ) , workerLogging : { failure : "error" as ActionheroLogLevel , success : "info" as ActionheroLogLevel , start : "info" as ActionheroLogLevel , end : "info" as ActionheroLogLevel , cleaning_worker : "info" as ActionheroLogLevel , poll : "debug" as ActionheroLogLevel , job : "debug" as ActionheroLogLevel , pause : "debug" as ActionheroLogLevel , reEnqueue : "debug" as ActionheroLogLevel , internalError : "error" as ActionheroLogLevel , multiWorkerAction : "debug" as ActionheroLogLevel , } , schedulerLogging : { start : "info" as ActionheroLogLevel , end : "info" as ActionheroLogLevel , poll : "debug" as ActionheroLogLevel , enqueue : "debug" as ActionheroLogLevel , working_timestamp : "debug" as ActionheroLogLevel , reEnqueue : "debug" as ActionheroLogLevel , transferred_job : "debug" as ActionheroLogLevel , } , timeout : 5000 , minTaskProcessors : 0 , maxTaskProcessors : 0 , checkTimeout : 500 , maxEventLoopDelay : 5 , stuckWorkerTimeout : 1000 * 60 * 60 , retryStuckJobs : false , resque_overrides : { queue : null as Queue , multiWorker : null as MultiWorker , scheduler : null as Scheduler , } , connectionOptions : { tasks : { } , } , } ; } , } ; export const test = { [ namespace ] : ( ) => { return { timeout : 100 , checkTimeout : 50 , } ; } , } ;