|
@@ -320,7 +320,7 @@ def updateJob():
|
|
|
time.sleep(5)
|
|
|
except Exception as e:
|
|
|
print(e)
|
|
|
-
|
|
|
+ db_client.close()
|
|
|
print("服务号更新完成")
|
|
|
|
|
|
|
|
@@ -352,6 +352,8 @@ def checkJob():
|
|
|
except Exception as e:
|
|
|
print("Timeout Error: {}".format(e))
|
|
|
|
|
|
+ db_client.close()
|
|
|
+
|
|
|
|
|
|
def job_with_thread(job_func):
|
|
|
"""
|
|
@@ -364,7 +366,6 @@ def job_with_thread(job_func):
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
-
|
|
|
schedule.every().day.at("20:50").do(job_with_thread, updateJob)
|
|
|
|
|
|
schedule.every().day.at("21:30").do(job_with_thread, checkJob)
|
|
@@ -372,9 +373,9 @@ if __name__ == '__main__':
|
|
|
while True:
|
|
|
schedule.run_pending()
|
|
|
time.sleep(0.5)
|
|
|
- # log(
|
|
|
- # task="updatePublishedMsgDaily",
|
|
|
- # function="main",
|
|
|
- # message="更新公众号文章信息任务正常执行"
|
|
|
- # )
|
|
|
+ log(
|
|
|
+ task="updatePublishedMsgDaily",
|
|
|
+ function="main",
|
|
|
+ message="更新公众号文章信息任务正常执行"
|
|
|
+ )
|
|
|
|