|
@@ -15,20 +15,20 @@ cursor_general = db.query('select domain from seo.general_log order by id desc l
|
|
|
for c in cursor_rank:
|
|
|
last_time = c['dt']
|
|
|
diff = datetime.now() - last_time
|
|
|
-if diff.seconds > 600:
|
|
|
- print('google_rank異常,啟動reboot.py')
|
|
|
- os.system('python3 reboot.py')
|
|
|
-print('google_rank正常')
|
|
|
-
|
|
|
lst = []
|
|
|
for c in cursor_general:
|
|
|
if c['domain'] not in d:
|
|
|
lst.append(1)
|
|
|
-if len(lst) > 0:
|
|
|
- print('general正常')
|
|
|
-else:
|
|
|
- print('general異常,啟動reboot.py')
|
|
|
+if diff.seconds > 600:
|
|
|
+ print('google_rank異常,啟動reboot.py')
|
|
|
os.system('python3 reboot.py')
|
|
|
+else:
|
|
|
+ print('google_rank正常')
|
|
|
+ if len(lst) > 0:
|
|
|
+ print('general正常')
|
|
|
+ else:
|
|
|
+ print('general異常,啟動reboot.py')
|
|
|
+ os.system('python3 reboot.py')
|
|
|
|
|
|
|
|
|
|