Use process name instead of pid for fedmsg monitoring socket filename.

This commit is contained in:
Ralph Bean 2014-04-28 13:46:20 +00:00
parent c71162ec08
commit e85878d802

View file

@ -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