python - Supervisor eventlistener in subshell -


i writing supervisor event listener can send process state events queue further processing. event listener written in python, let's call handler.py. have internal build , release system python allows me create virtual environments before executing python scripts of servers using omnipresent bash script (called launcher.sh) looks this

... create virtualenv activate virtualenv python -m main_module 

i configure event listener in supervisor instance so:

[eventlistener:feedback] command = launcher.sh handler.py events=process_state 

i can see handler printing ready\n it's stdout none of events propagate , supervisor starts complain event buffer having overflowed. if change event listener configuration call python directly, so, things come life.

[eventlistener:feedback] command = <path virtualenv>/bin/python handler.py events=process_state 

the 1 thing tried call python using exec inside launcher.sh , can see no subprocess spawned way still doesn't work. wondering if related buffering of stdout writes or of sort knowledge @ depth limited. appreciate help.

to answer own question, reading supervisor code turns out checks stdout_text.startswith('ready') had make sure launcher.sh script did not print out before launching event handler.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -