hooks: fix logging info on callback daemon

This commit is contained in:
RhodeCode Admin 2023-01-20 11:54:27 +01:00
parent 72d370c14e
commit b19bdaa108

View file

@ -153,19 +153,20 @@ class HttpHooksCallbackDaemon(ThreadedHookCallbackDaemon):
POLL_INTERVAL = 0.01
def _prepare(self, txn_id=None, host=None, port=None):
host = host or '127.0.0.1'
self._done = False
self._daemon = TCPServer((host, port or 0), HooksHttpHandler)
_, port = self._daemon.server_address
self.hooks_uri = '{}:{}'.format(host, port)
self.txn_id = txn_id
# inject transaction_id for later verification
self._daemon.txn_id = self.txn_id
log.debug(
"Preparing HTTP callback daemon at `%s` and registering hook object",
self.hooks_uri)
self._daemon = TCPServer((host, port or 0), HooksHttpHandler)
_, port = self._daemon.server_address
def _run(self):
log.debug("Running event loop of callback daemon in background thread")
callback_thread = threading.Thread(