Conversation
// https://github.com/taskcluster/taskcluster-lib-monitor/pull/27 | ||
await this.monitor.reportError(err, 'error', {}, true); | ||
// Crash the process | ||
process.exit(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this behavior should be factored out to somewhere common, perhaps with tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, especially since this piece I think has bitten us twice now and is used in multiple places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that would be nice... It won't be in this PR though...
Ideally, some generic way of constructing a process that polls from azure queue and operates on the messages...
Took a look and I think the larged chunk of comments is regarding awaiting for the resolution of the reportError() promise. |
I have mixed feelings with regards to waiting for the I see error reporting as a best effort service... So I'm not sure there is any need to wait for it in most cases... I do it if the error is really critical... But it's mostly for cases where I want to shutdown after reporting the error... |
Does that make sense? |
makes sense, thanks. |
I'll enable the lint test and fix issues with it later...