Add version and state to heartbeat message
This commit is contained in:
parent
d2e20d86bb
commit
d9ecf3e4bf
@ -102,7 +102,8 @@ class Worker:
|
|||||||
if self._heartbeat_interval:
|
if self._heartbeat_interval:
|
||||||
now = time.time()
|
now = time.time()
|
||||||
if (now - self._heartbeat_msg) > self._heartbeat_interval:
|
if (now - self._heartbeat_msg) > self._heartbeat_interval:
|
||||||
logger.info(f"Bot heartbeat. PID={getpid()}")
|
logger.info(f"Bot heartbeat. PID={getpid()}, "
|
||||||
|
f"version='{__version__}', state='{state.name}'")
|
||||||
self._heartbeat_msg = now
|
self._heartbeat_msg = now
|
||||||
|
|
||||||
return state
|
return state
|
||||||
|
Loading…
Reference in New Issue
Block a user