diff --git a/roles/fedmsg/base/templates/base.py.j2 b/roles/fedmsg/base/templates/base.py.j2 index b55b48c966..3eee0644ac 100644 --- a/roles/fedmsg/base/templates/base.py.j2 +++ b/roles/fedmsg/base/templates/base.py.j2 @@ -1,4 +1,8 @@ import os +import psutil + +pid = os.getpid() +proc = [p for p in psutil.process_iter() if p.pid == pid][0] config = dict( # Set this to dev if you're hacking on fedmsg or an app locally. @@ -47,4 +51,4 @@ config = dict( zmq_tcp_keepalive_intvl=5, ) # This option adds an IPC socket by which we can monitor hub health. -config['moksha.monitoring.socket'] = 'ipc:///var/run/fedmsg/monitoring-%i.socket' % os.getpid() +config['moksha.monitoring.socket'] = 'ipc:///var/run/fedmsg/monitoring-%s.socket' % proc.name