You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is similar to #68 but not quite the same. We use Job.get to avoid creating duplicate jobs, but when we add on('complete',...) handler for the Job instance returned by Job.get then nothing fires. This is because the redis pubsub events are wired into job's EventEmitter using events.add(job) which is only called after a successful job.save.
I'm not sure if we should call job.save ourselves on the returned job from Job.get or if we should call events.add(job) or if Job.get should be doing that - thoughts?
The text was updated successfully, but these errors were encountered:
@RandomEtc Have you already implemented anything for this issue? It would be nice to have a subscribe method on a job that calls events.add(this). After saving a job it auto-subscribes itself to any events (as it does now) but we'd also have the option of calling subscribe after retrieving a job via Job.get to start receiving updates.
This is similar to #68 but not quite the same. We use
Job.get
to avoid creating duplicate jobs, but when we addon('complete',...)
handler for the Job instance returned byJob.get
then nothing fires. This is because the redis pubsub events are wired into job's EventEmitter usingevents.add(job)
which is only called after a successfuljob.save
.I'm not sure if we should call
job.save
ourselves on the returned job fromJob.get
or if we should callevents.add(job)
or ifJob.get
should be doing that - thoughts?The text was updated successfully, but these errors were encountered: