gramex
gramex copied to clipboard
GRAMEX-206 ⁃ Schedules should support an error alert
When a schedule fails, users are unaware of it unless they look at logs.
Allow schedules to support an error-alert: config that specifies the error alert to call. For example:
schedule:
run-periodically: mymodule.myfunction()
every: 6h
error-alert: email-admin
alert:
to: '[email protected]'
subject: 'Gramex raised an Exception'
body: ...
If there's an exception, this sends an email using the alert.
┆Issue is synchronized with this Jira Bug
Note. We might want to extend this to a general error alert schedule, that captures all error logs and emails them at a developer-decided frequency.