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

feat: Added option to provide custom queues #1195

Merged
merged 4 commits into from
Sep 16, 2021

Conversation

fproldan
Copy link
Contributor

@fproldan fproldan commented Aug 30, 2021

What type of a PR is this?

  • Changes to Existing Features
  • New Feature Submissions
  • Bug Fix
  • Breaking Change (include change in API behaviours, etc.)

This PR adds the option to configure a new settings in common_site_config.json that allows creating custom workers besides the defaults hardcoded in supervisor.conf.

The new setting is named "workers" and should be in this format:

"workers": {
    "<queue_name>": {
        "timeout": <timeout>, 
        "background_workers": <workers>,
    }   
 }

Example:

"workers": {
    "myqueue": {
        "timeout": 5000, 
        "background_workers": 4,
    }   
 }

The background_workers param is optional, if not set the general background_workers will be used.

@gavindsouza gavindsouza added add-docs New feature should be have an entry in documentation to increase the discoverability and removed add-docs New feature should be have an entry in documentation to increase the discoverability labels Sep 9, 2021
Copy link
Collaborator

@gavindsouza gavindsouza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution 💯

I think the config key workers would be more accurate instead of custom_queues, since they are actually just named workers not queues.

@fproldan
Copy link
Contributor Author

@gavindsouza changes made!

@gavindsouza
Copy link
Collaborator

LGTM, can you raise a PR that adds docs to frappe/frappe_docs too?

@gavindsouza gavindsouza merged commit 9b2b105 into frappe:develop Sep 16, 2021
@gavindsouza
Copy link
Collaborator

@fproldan We missed adding this to the Procfile 😅 . Can you raise a PR for the same?

@fproldan fproldan mentioned this pull request Sep 17, 2021
1 task
@fproldan
Copy link
Contributor Author

@gavindsouza done!

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.

2 participants