Show More
@@ -153,19 +153,20 b' class HttpHooksCallbackDaemon(ThreadedHo' | |||
|
153 | 153 | POLL_INTERVAL = 0.01 |
|
154 | 154 | |
|
155 | 155 | def _prepare(self, txn_id=None, host=None, port=None): |
|
156 | ||
|
156 | 157 | host = host or '127.0.0.1' |
|
157 | 158 | self._done = False |
|
158 | self._daemon = TCPServer((host, port or 0), HooksHttpHandler) | |
|
159 | _, port = self._daemon.server_address | |
|
160 | 159 | self.hooks_uri = '{}:{}'.format(host, port) |
|
161 | 160 | self.txn_id = txn_id |
|
162 | 161 | # inject transaction_id for later verification |
|
163 | 162 | self._daemon.txn_id = self.txn_id |
|
164 | ||
|
165 | 163 | log.debug( |
|
166 | 164 | "Preparing HTTP callback daemon at `%s` and registering hook object", |
|
167 | 165 | self.hooks_uri) |
|
168 | 166 | |
|
167 | self._daemon = TCPServer((host, port or 0), HooksHttpHandler) | |
|
168 | _, port = self._daemon.server_address | |
|
169 | ||
|
169 | 170 | def _run(self): |
|
170 | 171 | log.debug("Running event loop of callback daemon in background thread") |
|
171 | 172 | callback_thread = threading.Thread( |
General Comments 0
You need to be logged in to leave comments.
Login now