mirror of
https://github.com/omg-xtao/ytdlbot.git
synced 2024-11-16 03:45:23 +00:00
more suicide
This commit is contained in:
parent
fcb01bd140
commit
9cbf0133ab
@ -177,7 +177,14 @@ class Detector:
|
||||
def updates_too_long_detector(self):
|
||||
# If you're seeing this, that means you have logged more than 10 device
|
||||
# and the earliest account was kicked out. Restart the program could get you back in.
|
||||
indicators = ["types.UpdatesTooLong", "Got shutdown from remote", "Code is updated"]
|
||||
indicators = [
|
||||
"types.UpdatesTooLong",
|
||||
"Got shutdown from remote",
|
||||
"Code is updated",
|
||||
'Retrying "messages.GetMessages"',
|
||||
"OSError: Connection lost",
|
||||
"[Errno -3] Try again"
|
||||
]
|
||||
for indicator in indicators:
|
||||
if indicator in self.logs:
|
||||
logging.warning("Potential crash detected by %s, it's time to commit suicide...", self.func_name())
|
||||
|
@ -337,7 +337,7 @@ def periodic_sub_check():
|
||||
|
||||
if __name__ == '__main__':
|
||||
MySQL()
|
||||
scheduler = BackgroundScheduler(timezone="Asia/Shanghai")
|
||||
scheduler = BackgroundScheduler(timezone="Asia/Shanghai", job_defaults={'max_instances': 5})
|
||||
scheduler.add_job(Redis().reset_today, 'cron', hour=0, minute=0)
|
||||
scheduler.add_job(auto_restart, 'interval', seconds=5)
|
||||
scheduler.add_job(InfluxDB().collect_data, 'interval', seconds=60)
|
||||
|
Loading…
Reference in New Issue
Block a user