forked from Firepup650/FireBot
Add logging for checkups, and increase delay between checks
This commit is contained in:
parent
eb43698ff3
commit
2a9e3a7aea
1 changed files with 3 additions and 2 deletions
5
core.py
5
core.py
|
@ -21,7 +21,7 @@ def is_dead(thr):
|
|||
thr.join(timeout=0)
|
||||
return not thr.is_alive()
|
||||
|
||||
def start():
|
||||
def start(server):
|
||||
t = Thread(target=launch, args=(server,))
|
||||
t.daemon = True
|
||||
t.start()
|
||||
|
@ -33,7 +33,8 @@ if __name__ == "__main__":
|
|||
threads[server] = start(server)
|
||||
print("[LOG][CORE] Started all instances. Idling...")
|
||||
while 1:
|
||||
sleep(10)
|
||||
sleep(60)
|
||||
print("[LOG][CORE] Running a checkup on all running instances")
|
||||
for server in threads:
|
||||
t = threads[server]
|
||||
if is_dead(t):
|
||||
|
|
Loading…
Reference in a new issue