jdemaeyer / brightsky

JSON API for DWD's open weather data.
https://brightsky.dev/
MIT License
287 stars 18 forks source link

Add Sentry cron monitor for worker #165

Open jdemaeyer opened 4 months ago

jdemaeyer commented 4 months ago

I disabled an automated hourly restart of the worker as part of https://github.com/jdemaeyer/brightsky/issues/154. Hiccups in the worker seem to be rare but occured yesterday. In this particular case, the worker was still live and logging huey's status messages, but did not pick up any parsing tasks.

Consequently, we did not process any new DWD data for a couple hours. While that triggerd a "current weather not up to date" alert I have set up in my personal systems, that system was not noisy enough (or rather, the error was overshadowed by longer-running problems in other systems) and I only noticed the issue when I received an "new issue" email via #164. Adding a huey task that checks in with Sentry Cron Monitoring every x minutes should catch this kind of worker failures and will create email notifications without relying on user reports.