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

Generalize the worker pool implementation #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jpcamara
Copy link
Member

@jpcamara jpcamara commented Feb 3, 2021

  • delayed_job_worker_pool is a great worker pool implementation, that's in many ways already pretty generalized

  • With some tweaks, it could be an awesome general worker pool usable for any task.

  • This initial work primarily switches to a more generic bin name, and allows you to hand in a worker_factory so that it can start any worker code you have built, vs only being able to start the delayed job worker code

  • There are lots more generalizations to be made, but this is a first step that already makes it usable for other tasks (you still have to handle signals in your code, since those get deregistered in the forks, but that's ok for now)

* delayed_job_worker_pool is a great worker pool implementation, that's in many already pretty generalized

* With some tweaks, it could be an awesome general worker pool usable for any task.

* This initial work primarily switches to a more generic bin name, and allows you to hand in a  so that it can start any worker code you have built, vs only being able to start the delayed job worker code

* There are lots more generalizations to be made, but this is a first step that already makes it usable for other tasks (you still have to handle signals in your code, since those get deregistered in the forks, but that's ok for now)
* Kludgy - the idea is wanting to know if you have a set of 4 workers, which part of the set failed so when you re-fork a new worker it can take over the work that was previously being acted on in the failed process
* Fix immediately broken spec (some other specs still fail currently because we no longer include delayed job active record)
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

Successfully merging this pull request may close these issues.

1 participant