MCPcopy Create free account
hub / github.com/actionhero/node-resque / onComplete

Function onComplete

__tests__/plugins/jobLock.ts:88–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86 let completed = 0;
87
88 const onComplete = function () {
89 completed++;
90 if (completed === 2) {
91 worker1.end();
92 worker2.end();
93 expect(new Date().getTime() - startTime).toBeLessThan(jobDelay * 3);
94 resolve(null);
95 }
96 };
97
98 worker1.on("success", onComplete);
99 worker2.on("success", onComplete);

Callers

nothing calls this directly

Calls 2

timestampsMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected