diff options
| author | jason | 2018-01-08 19:50:50 -0700 |
|---|---|---|
| committer | jason | 2018-01-08 20:07:42 -0700 |
| commit | cbc63f6d36cda3d3ca5d59a0d6147688f4f3452c (patch) | |
| tree | b48e753fd2ce25f1f68eddb61c5e7cccc287f101 | |
| parent | 5b813d3eb5368831beb1985ddc569c8e7cec8bad (diff) | |
| download | eventmq-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__.py | 2 | ||||
| -rw-r--r-- | eventmq/jobmanager.py | 9 | ||||
| -rw-r--r-- | setup.py | 2 |
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 | ||
| 4 | PROTOCOL_VERSION = 'eMQP/1.0' | 4 | PROTOCOL_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: |
| @@ -7,7 +7,7 @@ from setuptools import find_packages, setup | |||
| 7 | 7 | ||
| 8 | setup( | 8 | setup( |
| 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', |