My supervisord.conf
contains a bunch of programs like so:
[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.
Sometimes supervisor can't find command with relative path even if directory is setup.
So 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
rather than:
[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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With