Catch slack errors and add a command to remove jobs #388
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On Friday Rich tried to run an op command, but nothing happened
https://bennettoxford.slack.com/archives/CGF9TKZLG/p1704475634495869
@BennettBot status
suggested that this request to run a measures preview from 2nd Jan was still running, so the new request was just scheduled. Something apparently happened that meant the job didn't report that it either failed or succeeded, but I can't see far enough back in the old logs to see if anything was logged. In any case, the "running" job blocked any attempts to retry it, so this PR adds a command to remove a job by id in case this happens again.Although I can't see if it was the case for the 2nd Jan job, there was an instance of an uncaught error from slack
This seems to be an occasional transient thing, but if we happen to encounter it when notifying slack of starting or completing a job, we don't want it to prevent the job from being marked as complete, so now it retries up to 3 times and then logs the error.