Browse Source

add time.sleep

wangkun 2 years ago
parent
commit
cd06776f35
2 changed files with 4 additions and 2 deletions
  1. 2 1
      main/run_update_kanyikan.py
  2. 2 1
      main/run_update_xiaoniangao.py

+ 2 - 1
main/run_update_kanyikan.py

@@ -17,6 +17,7 @@ class Main:
         while True:
             today = Common.today
             Common.logger("kanyikan").info("today:{}", today)
+            time.sleep(600)
             while True:
                 main_time = datetime.datetime.now()
                 if main_time.hour == 1:
@@ -30,7 +31,7 @@ class Main:
                     time.sleep(3600)
                     break
                 else:
-                    pass
+                    break
 
 
 if __name__ == "__main__":

+ 2 - 1
main/run_update_xiaoniangao.py

@@ -17,6 +17,7 @@ class Main:
         while True:
             today = Common.today
             Common.logger("xiaoniangao").info("today:{}", today)
+            time.sleep(600)
             while True:
                 main_time = datetime.datetime.now()
                 if main_time.hour == 1:
@@ -29,7 +30,7 @@ class Main:
                     time.sleep(3600)
                     break
                 else:
-                    pass
+                    break
 
 
 if __name__ == "__main__":