Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Monitor Sidekiq Cron Workers #456

Open
rslhdyt opened this issue Mar 27, 2024 · 1 comment
Open

[Question] Monitor Sidekiq Cron Workers #456

rslhdyt opened this issue Mar 27, 2024 · 1 comment
Labels

Comments

@rslhdyt
Copy link

rslhdyt commented Mar 27, 2024

Hi,

First, thanks for all the hard work you put into keeping this gem running smoothly. It's really helpful.

Recently, I ran into a problem because some cron workers didn't run like they were supposed to. This happened because the pod restarted, which was caused by some bad queries inside the worker class. I'm wondering how you all keep track of whether all the sidekiq-cron processes are running as they should.

I've been thinking about using sidekiq middleware to store a key before a worker starts and then remove the key once the worker is done. This way, I could check if the key is still there to know if the worker didn't run correctly. What do you think about this idea?

@markets
Copy link
Member

markets commented Mar 28, 2024

Hello @rslhdyt,

I'm actually using the https://github.com/smartinez87/exception_notification gem. You can use for example the manual notification approach inside your job class. So if any error (or specific condition) raises inside your job, you'll receive a notification via email, Slack, Datadog, ...

It seems you may also want to know if the job even run (not only if there is an error). For that, your idea seems feasible, why not? The gem didn't provide any api/option to handle that, as we rely on the Sidekiq process itself to boot our scheduler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants