directory where your source code is importable from This is the directory from which RQ is ran. If you want to run more than one worker instance, increase this Process_name=%(program_name)s-%(process_num)s ![]() ![]() process_num is required if you specify >1 numprocs Also, you probably want to include a settings module to configure thisĮnvironment=PATH='/opt/conda/envs/myenv/bin'Ĭommand=/opt/conda/envs/myenv/bin/rq worker -c mysettings high normal low For conda virtual environments, install RQ into your env. Point the command to the specific rq command you want to run. Add the following, which shows how to run RQ as a service from a conda environment, to the end of the files (you will need sudo privileges to edit this file) as shown on the RQ page. I chose to install RQ under a conda environment so as to isolate that environment. This installs a configuration file at /etc/nf that determines what jobs are started and how they are managed. On a Linux machine you can install using supervisor using one of the following depending on your distribution sudo yum install supervisor You may want to use supervisor to manage rq worker and rqscheduler processes. If we want to schedule jobs using RQ-scheduler start that as well with.You may want to daemonize this, follow instructions given here to do that. Start the Redis server by typing the following command.Install the RQ scheduler using pip install rq-scheduler Now install ‘RQ’ using the following pip install rq Run ‘make test’ to make sure things are working properly, followed by ‘sudo make install’ to complete the installation. ![]() InstallationĬreate a virtual environment and we will have to install the following components: Some steps on how to install and get started with RQ are listed below. RQ can be used to set up queues for executing long-running tasks on local or remote machines.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |