aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason2018-01-08 19:50:50 -0700
committerjason2018-01-08 20:07:42 -0700
commitcbc63f6d36cda3d3ca5d59a0d6147688f4f3452c (patch)
treeb48e753fd2ce25f1f68eddb61c5e7cccc287f101
parent5b813d3eb5368831beb1985ddc569c8e7cec8bad (diff)
downloadeventmq-cbc63f6d36cda3d3ca5d59a0d6147688f4f3452c.tar.gz
eventmq-cbc63f6d36cda3d3ca5d59a0d6147688f4f3452c.zip
Add back sending ready on reconnections.0.3.5.3
- without this the workers get starved.
-rw-r--r--eventmq/__init__.py2
-rw-r--r--eventmq/jobmanager.py9
-rw-r--r--setup.py2
3 files changed, 11 insertions, 2 deletions
diff --git a/eventmq/__init__.py b/eventmq/__init__.py
index ac30476..0f12b07 100644
--- a/eventmq/__init__.py
+++ b/eventmq/__init__.py
@@ -1,5 +1,5 @@
1__author__ = 'EventMQ Contributors' 1__author__ = 'EventMQ Contributors'
2__version__ = '0.3.5.2' 2__version__ = '0.3.5.3'
3 3
4PROTOCOL_VERSION = 'eMQP/1.0' 4PROTOCOL_VERSION = 'eMQP/1.0'
5 5
diff --git a/eventmq/jobmanager.py b/eventmq/jobmanager.py
index f85bf66..78a080b 100644
--- a/eventmq/jobmanager.py
+++ b/eventmq/jobmanager.py
@@ -146,6 +146,15 @@ class JobManager(HeartbeatMixin, EMQPService):
146 """ 146 """
147 Starts the actual event loop. Usually called by :meth:`start` 147 Starts the actual event loop. Usually called by :meth:`start`
148 """ 148 """
149 # Acknowledgment has come
150 # When the job manager unexpectedly disconnects from the router and
151 # reconnects it needs to send a ready for each previously available
152 # worker.
153 # Send a READY for each previously available worker
154 if hasattr(self, '_workers'):
155 for _ in self._workers:
156 self.send_ready()
157
149 self.status = STATUS.running 158 self.status = STATUS.running
150 159
151 try: 160 try:
diff --git a/setup.py b/setup.py
index 3664ba9..15d5ab7 100644
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@ from setuptools import find_packages, setup
7 7
8setup( 8setup(
9 name='eventmq', 9 name='eventmq',
10 version='0.3.5.2', 10 version='0.3.5.3',
11 description='EventMQ job execution and messaging system based on ZeroMQ', 11 description='EventMQ job execution and messaging system based on ZeroMQ',
12 packages=find_packages(), 12 packages=find_packages(),
13 install_requires=['pyzmq==15.4.0', 13 install_requires=['pyzmq==15.4.0',