msavin / SteveJobs

A simple jobs queue that just works (for Meteor.js)
Other
207 stars 35 forks source link

Error is printed in console, but not saved in job #77

Closed gerwinbrunner closed 4 years ago

gerwinbrunner commented 5 years ago

https://github.com/msavin/SteveJobs/blob/521d70fae5c614a657ec21f1ff6e8ad5a97420e4/package/server/imports/actions/execute/process.js#L24-L26

The job is set to be a failure, but the exception and stack in not persisted. It would be really nice if the stacktrace is not only logged to the console, but also to the Job failture.

Would that make sense to someone else?

gerwinbrunner commented 5 years ago

Just adding this will auto add the error:

    var failure = Toolbelt.failure(e.stack); 
msavin commented 5 years ago

@gerwinbrunner good idea, can you PR it?

msavin commented 4 years ago

@gerwinbrunner error is now saved when a job fails