, , , , , script, huey_consumer.py script ( exec python).
, , .
:
:
[program:MyExample]
command=/ama/nms/MyExample/supervisor_myexample.sh
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
numprocs=1 ; number of processes copies to start (def 1)
directory=/ama/nms/MyExample ; directory to cwd to before exec (def no cwd)
priority=10 ; the relative start priority (default 999)
autostart=true ; start at supervisord start (default: true)
autorestart=true ; retstart at unexpected quit (default: true)
startsecs=1 ; number of secs prog must stay running (def. 1)
startretries=10 ; max # of serial start failures (default 3)
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
stopsignal=TERM ; signal used to kill process (default TERM)
stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
/ama/nms/MyExample/supervisor _myexample.sh:
#!/bin/sh
export LD_LIBRARY_PATH=<...>:$LD_LIBRARY_PATH
export PYTHONPATH=<...>:$PYTHONPATH
D=`dirname $0`
exec python $D/myexample.py arg1 arg2 arg3
exec, pid .