| Server IP : _ / Your IP : 169.254.129.1 Web Server : nginx/1.28.0 System : Linux 89e302d72aa1 6.6.143.1-1.azl3 #1 SMP PREEMPT_DYNAMIC Mon Jul 6 04:01:14 UTC 2026 x86_64 User : nginx ( 103) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/doc/supervisor/examples/ |
Upload File : |
#!/usr/bin/python3 -u
# An event listener that listens for process communications events
# from loop_eventgen.py and uses RPC to write data to the event
# generator's stdin.
import os
from supervisor import childutils
def main():
rpcinterface = childutils.getRPCInterface(os.environ)
while 1:
headers, payload = childutils.listener.wait()
if headers['eventname'].startswith('PROCESS_COMMUNICATION'):
pheaders, pdata = childutils.eventdata(payload)
pname = '%s:%s' % (pheaders['processname'], pheaders['groupname'])
rpcinterface.supervisor.sendProcessStdin(pname, 'Got it yo\n')
childutils.listener.ok()
if __name__ == '__main__':
main()