rschmukler/agenda — pull request #69 by fiznool (2014-06-05 15:32:30+00:00)
Title: Stale jobs are saved when they shouldn't be

Related to #68.

If a job is removed from the database while the job is being performed, once the job has completed, it will be re-added to the database. This test case reproduces the issue.

I am going to have a stab at modifying `Agenda.prototype.saveJob` so that if the job is being modified and it no longer exists in the database, it silently fails (as the current `Job.prototype.save` method does).