mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-24 08:39:59 -05:00
worker: add thread to the binding
This commit is contained in:
parent
5bf831605a
commit
564307c7f8
@ -45,7 +45,7 @@ r = rdb.RethinkDB()
|
|||||||
|
|
||||||
|
|
||||||
class BrozzlerWorker:
|
class BrozzlerWorker:
|
||||||
logger = structlog.get_logger()
|
logger = structlog.get_logger(logger_name=__module__ + "." + __qualname__)
|
||||||
|
|
||||||
# 3⅓ min heartbeat interval => 10 min ttl
|
# 3⅓ min heartbeat interval => 10 min ttl
|
||||||
# This is kind of a long time, because `frontier.claim_sites()`, which runs
|
# This is kind of a long time, because `frontier.claim_sites()`, which runs
|
||||||
@ -739,6 +739,7 @@ class BrozzlerWorker:
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
self._thread = threading.Thread(target=self.run, name="BrozzlerWorker")
|
self._thread = threading.Thread(target=self.run, name="BrozzlerWorker")
|
||||||
|
self.logger = self.logger.bind(thread=self._thread)
|
||||||
self._thread.start()
|
self._thread.start()
|
||||||
|
|
||||||
def shutdown_now(self):
|
def shutdown_now(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user