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

Track processes in the database #421

Closed
bensheldon opened this issue Oct 11, 2021 · 5 comments
Closed

Track processes in the database #421

bensheldon opened this issue Oct 11, 2021 · 5 comments

Comments

@bensheldon
Copy link
Owner

There should be a table of GoodJob processes in the database. They can be updated via a heartbeat by the Notifier, which should always hold a database connection. And a timeout value such that if the updated_at value hasn't been touched, the process would be treated as expired.

(Refactoring-wise: I think the notifier could become a more generalized 1-per-process supervisor that also contains the Poller's functionality too)

@jrochkind
Copy link
Contributor

Nice! This is a feature that resque has (although I don't think sidekiq actually does?)

It is a somewhat error-prone and complex part of resque though, that ends up having a lot of lines of code behind it. Resque seems to have found it somewhat tricky to get right.

@bensheldon
Copy link
Owner Author

@jrochkind thank you! I'll take a look at how Resque does it. Redis does have the capability to enumerate over all processes: https://www.rubydoc.info/github/mperham/sidekiq/Sidekiq/ProcessSet

@bensheldon
Copy link
Owner Author

Considering this story done for the moment. Improvements are tracked in #560.

To query processes:

GoodJob::Process.all

@jrochkind
Copy link
Contributor

Awesome! Are these yet revealed in the admin dashboard?

@bensheldon
Copy link
Owner Author

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

No branches or pull requests

2 participants