diff options
| -rw-r--r-- | eventmq/router.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/eventmq/router.py b/eventmq/router.py index c35e88c..0b896b3 100644 --- a/eventmq/router.py +++ b/eventmq/router.py | |||
| @@ -175,15 +175,6 @@ class Router(HeartbeatMixin): | |||
| 175 | now = monotonic() | 175 | now = monotonic() |
| 176 | events = self.poller.poll() | 176 | events = self.poller.poll() |
| 177 | 177 | ||
| 178 | if events.get(self.incoming) == poller.POLLIN: | ||
| 179 | msg = self.incoming.recv_multipart() | ||
| 180 | self.handle_wal_log(msg) | ||
| 181 | self.process_client_message(msg) | ||
| 182 | |||
| 183 | if events.get(self.outgoing) == poller.POLLIN: | ||
| 184 | msg = self.outgoing.recv_multipart() | ||
| 185 | self.process_worker_message(msg) | ||
| 186 | |||
| 187 | if events.get(self.administrative_socket) == poller.POLLIN: | 178 | if events.get(self.administrative_socket) == poller.POLLIN: |
| 188 | msg = self.administrative_socket.recv_multipart() | 179 | msg = self.administrative_socket.recv_multipart() |
| 189 | if conf.SUPER_DEBUG: | 180 | if conf.SUPER_DEBUG: |
| @@ -207,6 +198,15 @@ class Router(HeartbeatMixin): | |||
| 207 | sendmsg(self.administrative_socket, msg[0], 'REPLY', | 198 | sendmsg(self.administrative_socket, msg[0], 'REPLY', |
| 208 | (self.get_schedulers_status(),)) | 199 | (self.get_schedulers_status(),)) |
| 209 | 200 | ||
| 201 | if events.get(self.incoming) == poller.POLLIN: | ||
| 202 | msg = self.incoming.recv_multipart() | ||
| 203 | self.handle_wal_log(msg) | ||
| 204 | self.process_client_message(msg) | ||
| 205 | |||
| 206 | if events.get(self.outgoing) == poller.POLLIN: | ||
| 207 | msg = self.outgoing.recv_multipart() | ||
| 208 | self.process_worker_message(msg) | ||
| 209 | |||
| 210 | # TODO: Optimization: the calls to functions could be done in | 210 | # TODO: Optimization: the calls to functions could be done in |
| 211 | # another thread so they don't block the loop. synchronize | 211 | # another thread so they don't block the loop. synchronize |
| 212 | if not conf.DISABLE_HEARTBEATS: | 212 | if not conf.DISABLE_HEARTBEATS: |