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

Support for Deployment of Multiple RQ Workers #129

Closed
tyler-8 opened this issue May 17, 2021 · 1 comment
Closed

Support for Deployment of Multiple RQ Workers #129

tyler-8 opened this issue May 17, 2021 · 1 comment

Comments

@tyler-8
Copy link
Collaborator

tyler-8 commented May 17, 2021

It's possible, particularly now with plugins, to have a need for multiple rq-workers in the environment to process all the background tasks simultaneously. The default one-worker deployment could fall behind if multiple reports, scripts, and other tasks are queued at the same time. Plugins can introduce even more complex workflows that may take longer to run.

The good news is rq supports deploying multiple workers quite easily and without making any code changes to NetBox itself. The systemd method of doing so is documented in the official docs.

to start workers by invoking systemctl start rqworker@1.service, systemctl start rqworker@2.service from the terminal.

You can also reload all the workers by invoking systemctl reload rqworker@*.

I'm imagining a simple setting like netbox_rqworker_count = 1 as the default. Users could change it to 4, which would start & enable rqworker@1, rqworker@2, rqworker@3, rqworker@4.

@lae
Copy link
Owner

lae commented Jul 25, 2023

implemented in #161

@lae lae closed this as completed Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants