fix(bot): 🐛 Make heartbeat update delay toleration longer.
This commit is contained in:
@@ -110,7 +110,7 @@ if __name__ == "__main__":
|
||||
shutdown = manager.Value("b", False)
|
||||
scheduled_shutdown = manager.Value("b", False)
|
||||
heartbeats = [
|
||||
manager.Value("i", 0) for i in range(shard_count)
|
||||
manager.Value("i", int(datetime.now(timezone.utc).timestamp())) for i in range(shard_count)
|
||||
]
|
||||
|
||||
print(f"Starting {shard_count} shard{"s" if shard_count != 1 else ""}.")
|
||||
@@ -148,7 +148,7 @@ if __name__ == "__main__":
|
||||
raise ShutdownException()
|
||||
|
||||
for i in range(shard_count):
|
||||
is_heartbeat_updated = heartbeats[i].value > (datetime.now(timezone.utc) - timedelta(seconds=10)).timestamp()
|
||||
is_heartbeat_updated = heartbeats[i].value > (datetime.now(timezone.utc) - timedelta(seconds=30)).timestamp()
|
||||
|
||||
if not ps[i].is_alive() or not is_heartbeat_updated:
|
||||
if not ps[i].is_alive():
|
||||
|
||||
Reference in New Issue
Block a user