1
0
Fork 0
mirror of synced 2024-07-15 11:15:59 +12:00

enable stalled job disabling

This commit is contained in:
Rory Powell 2022-08-20 11:02:22 +01:00
parent f273a6f779
commit 28cdb16e08
2 changed files with 4 additions and 4 deletions

View file

@ -4,11 +4,11 @@ import * as automation from "../threads/automation"
export const addListeners = (queue: Queue) => {
logging(queue)
// handleStalled(queue)
handleStalled(queue)
}
const handleStalled = (queue: Queue) => {
queue.on("active", async (job: Job) => {
queue.on("stalled", async (job: Job) => {
await automation.removeStalled(job as AutomationEvent)
})
}

View file

@ -473,9 +473,9 @@ export function execute(input: AutomationEvent, callback: WorkerCallback) {
})
}
export const removeStalled = (input: AutomationEvent) => {
export const removeStalled = async (input: AutomationEvent) => {
const appId = input.data.event.appId
doInAppContext(appId, async () => {
await doInAppContext(appId, async () => {
const automationOrchestrator = new Orchestrator(
input.data.automation,
input.data.event,