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