|
@@ -26,9 +26,10 @@ class JobManage(object):
|
|
|
# Global.aps.create_job(func=cls.job20102, trigger='date', run_date='2022-07-28 17:15:30') # 定时测试
|
|
|
|
|
|
# --- release ---
|
|
|
- Global.aps.create_job(func=cls.job101, trigger='cron', hour=22) # 每天晚10点 release
|
|
|
- # Global.aps.create_job(func=cls.job20102, trigger='interval', seconds=600) # 每10分钟 release
|
|
|
- # Global.aps.create_job(func=cls.job301, trigger='interval', seconds=300) # 每5分钟 release
|
|
|
+ # Global.aps.create_job(func=cls.job101, trigger='cron', hour=22) # 每天晚10点
|
|
|
+ Global.aps.create_job(func=cls.job101, trigger='interval', seconds=600) # 每10分钟
|
|
|
+ # Global.aps.create_job(func=cls.job101, trigger='interval', seconds=300) # 每5分钟
|
|
|
+ # Global.aps.create_job(func=cls.job101, trigger='interval', seconds=3600) # 每1小时
|
|
|
|
|
|
@classmethod
|
|
|
def end(cls):
|
|
@@ -44,6 +45,9 @@ class JobManage(object):
|
|
|
|
|
|
todo 根据UserWorkRecordList.start_at来判断过去7天的数据
|
|
|
"""
|
|
|
+ # --- log ---
|
|
|
+ methods.debug_log("JobManage|49", f"------------------------------ start")
|
|
|
+
|
|
|
# --- get log_file_uuid_list ---
|
|
|
log_file_list = methods.get_file_path_list(save_dir)
|
|
|
log_file_name_list = [i.split('\\')[-1] for i in log_file_list]
|
|
@@ -54,7 +58,7 @@ class JobManage(object):
|
|
|
|
|
|
# --- check ---
|
|
|
file_path = os.path.join(save_dir, f"{log_file_uuid}.log")
|
|
|
- item = Global.mdb.get_one_by_id('UserWorkRecordList', log_file_uuid)
|
|
|
+ item = Global.mdb.updage_one_by_id('UserWorkRecordList', log_file_uuid)
|
|
|
if not item:
|
|
|
methods.remove_file(file_path)
|
|
|
|