Some cleanup and documentation for zeromq implementation

This commit is contained in:
Matthew Jones
2014-02-17 11:11:48 -05:00
parent 770947d18d
commit 2c694e5e07
3 changed files with 18 additions and 103 deletions

View File

@@ -117,15 +117,16 @@ class CallbackModule(object):
'event_data': event_data,
'created': datetime.datetime.utcnow().isoformat(),
}
active_pid = os.getpid()
if self.job_callback_debug:
msg.update({
'pid': os.getpid(),
'pid': active_pid,
})
for retry_count in xrange(4):
try:
if not hasattr(self, 'connection_pid'):
self.connection_pid = os.getpid()
if self.connection_pid != os.getpid():
self.connection_pid = active_pid
if self.connection_pid != active_pid:
self._init_connection()
if self.context is None:
self._start_connection()