👍️[Update] All : 不要なprintLogを削除 / なるべくtry exceptした場合にはerrorLogを保存するように変更
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
from typing import Callable
|
||||
import time
|
||||
from utils import printLog
|
||||
|
||||
class Watchdog:
|
||||
def __init__(self, timeout:int=60, interval:int=20):
|
||||
@@ -16,7 +15,6 @@ class Watchdog:
|
||||
|
||||
def start(self):
|
||||
if time.time() - self.last_feed_time > self.timeout:
|
||||
printLog("Watchdog timeout! Shutting down...")
|
||||
if isinstance(self.callback, Callable):
|
||||
self.callback()
|
||||
time.sleep(self.interval)
|
||||
Reference in New Issue
Block a user