worker: add thread to the binding

This commit is contained in:
Misty De Méo 2025-02-20 11:29:54 -08:00
parent 5bf831605a
commit 564307c7f8

View File

@ -45,7 +45,7 @@ r = rdb.RethinkDB()
class BrozzlerWorker:
logger = structlog.get_logger()
logger = structlog.get_logger(logger_name=__module__ + "." + __qualname__)
# 3⅓ min heartbeat interval => 10 min ttl
# This is kind of a long time, because `frontier.claim_sites()`, which runs
@ -739,6 +739,7 @@ class BrozzlerWorker:
)
return
self._thread = threading.Thread(target=self.run, name="BrozzlerWorker")
self.logger = self.logger.bind(thread=self._thread)
self._thread.start()
def shutdown_now(self):