Improvment: Wont spawn extra queues #1508
Merged
+3
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Consider the follow setup:
Currently, in every environment, the MasterSupervisor run all the supervisors queues.
In a multi server deployment, if you spawn horizon on second server with the --environment=production-2, you always get a production-1 supervisors too (default queue in this case) (picture 1).
With this change, we can selectible choice the supervisors that we want to run on each enviroments, just checking for the maxProcess > 0.
Imagine that you want a horizon instance to only process slow queues, or you have a high power vm/cpu/vps that you just want to run specific queue.
I cant figure out how to dead with this cenario, without this change.
Maybe we can put a global config, to 'dont spawn queues not listed in supervisor'...
What do you think about?