Supervisord cannot find command in virtualenv folder

My supervisord.conf contains a bunch of such programs:

 [program:gtaskqueue_puller_1] directory=/root/scripts/gtaskqueue_puller command=venv/bin/gtaskqueue_puller "foo" autostart=true autorestart=true [program:gtaskqueue_puller_2] directory=/root/scripts/gtaskqueue_puller command=venv/bin/gtaskqueue_puller "bar" autostart=true autorestart=true 

But sometimes, when I restart supervisord, I get

 can't find command venv/bin/gtaskqueue_puller 

But when I cd into the directory and run the same command, it works as expected.

+6
source share
1 answer

Sometimes the dispatcher cannot find a command with a relative path, even if the directory is configured.

Therefore use:

 [program:gtaskqueue_puller_1] directory=/root/scripts/gtaskqueue_puller command=/root/scripts/gtaskqueue_puller/venv/bin/gtaskqueue_puller "foo" autostart=true autorestart=true [program:gtaskqueue_puller_2] directory=/root/scripts/gtaskqueue_puller command=/root/scripts/gtaskqueue_puller/venv/bin/gtaskqueue_puller "bar" autostart=true autorestart=true 

but not:

 [program:gtaskqueue_puller_1] directory=/root/scripts/gtaskqueue_puller command=venv/bin/gtaskqueue_puller "foo" autostart=true autorestart=true [program:gtaskqueue_puller_2] directory=/root/scripts/gtaskqueue_puller command=venv/bin/gtaskqueue_puller "bar" autostart=true autorestart=true 
+6
source

Source: https://habr.com/ru/post/943440/


All Articles