lykmapipo / kue-scheduler

A job scheduler utility for kue, backed by redis and built for node.js
246 stars 47 forks source link

check ttl of job in ensureUniqueJob to reschedule stale jobs #94

Closed gmcnaught closed 7 years ago

gmcnaught commented 7 years ago

Fix for #82 , checks if a job is 'active' and beyond its ttl by (arbitrarily) 1.5x , and if so schedules the next run of it.

This trades the risk that a client that crashes while processing a unique job could leave it stuck in active, forever and adds the risk that a job could get rescheduled while it is still running on a client that has suffered a network split, but only after 1.5x the ttl.