Fixing events not firing on attempt > 1 #156

Merged
merged 3 commits into from Jul 23, 2013

Conversation

Projects
None yet
3 participants
Contributor

Jellyfrog commented Dec 7, 2012

Fixes: #98
(Shamelessly stolen from @bbn again, all credit to him!)

Linus Larsson added some commits Dec 7, 2012

@tj tj commented on the diff Dec 7, 2012

lib/queue/events.js
@@ -66,8 +77,6 @@ exports.onMessage = function(channel, msg){
var job = exports.jobs[msg.id];
if (job) {
job.emit.apply(job, msg.args);
- // TODO: abstract this out
- if ('progress' != msg.event) delete exports.jobs[job.id];
@tj

tj Dec 7, 2012

Contributor

i dont recall what the point of this was ATM, removing it may not be the right way to go

@Jellyfrog

Jellyfrog Dec 11, 2012

Contributor

I guess you thought you should remove it as soon as possible, ie. when the job is "complete" or "failed"
This will prevent futher events from being emitted tho, for example if a job failes and attempts() are specified.

@drudge drudge added a commit that referenced this pull request Jul 23, 2013

@drudge drudge Merge pull request #156 from Jellyfrog/job-remove
Fixing events not firing on attempt > 1
86f51ef

@drudge drudge merged commit 86f51ef into Automattic:master Jul 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment