![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /lib/python3.6/site-packages/supervisor/scripts/ |
# 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()