-
Notifications
You must be signed in to change notification settings - Fork 867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always emit errors, even if they are worker errors. #314
Conversation
…e them in code and pass them to a centeralized error handler
Why don't you bind on job 'error' events? |
I wanted to bind to all worker errors at the top level, not have to do it for each instance of the job. |
Job errors are emitted when they are marking
I close this. |
Do you have an example of listening to kue/worker errors? On Tue, Apr 22, 2014 at 1:33 PM, Behrad notifications@github.com wrote:
|
|
Oh yeah, I am doing that, the question should have been listening to job On Tue, Apr 22, 2014 at 2:23 PM, Behrad notifications@github.com wrote:
|
You can do this on both sides, but my question is that why you would do it on the worker side? |
@behrad Could this error event get some documentation on the front page...or atleast be noted that it does exist :) (Unless I am totally oblivious to API documentation somewhere else). |
Sure @toddbluhm Dya mean #409 ? |
@behrad Thanks! Clearly I'm completely oblivious :) |
@behrad How would you listen to errors on the producer side when submitting jobs through the REST "api"? Because of that I'm trying to get failded job at the worker side...
And unfortunately it seems like this never get called ... Obviously I must have missed something... |
You should poll https://github.com/LearnBoost/kue#get-jobid and check
when binding to queue level events, you should prefix event name with 'job': var jobs = kue.createQueue();
jobs.on('job failed', function (id) {
console.log(id);
});
` |
This allows us to handle errors in code and pass them to a centralized error handler like sentry.