From 66af50002d1b8b0810d73af5f591ddbb4ecd2bd3 Mon Sep 17 00:00:00 2001 From: qdxkrs Date: Wed, 16 Feb 2022 09:27:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- common/config/factory.py | 112 +++++++++++++++++++-------------------- util/file_util.py | 3 -- 3 files changed, 57 insertions(+), 60 deletions(-) diff --git a/.gitignore b/.gitignore index 76a17c4..4bdcc8d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ __pycache__/ *.so ### IntelliJ IDEA ### -.idea +.idea/ *.iws *.iml *.ipr diff --git a/common/config/factory.py b/common/config/factory.py index ceb7f06..69154c3 100644 --- a/common/config/factory.py +++ b/common/config/factory.py @@ -17,66 +17,66 @@ def create_app(): "SCHEDULER_API_ENABLED": True, "SCHEDULER_TIMEZONE": "Asia/Shanghai", "JOBS": [ - { - "id": "my_job", # 任务ID - "func": "util:scan_file_util.scan_VJ102_dir", # 任务位置 - "trigger": "interval", # 触发器 - "seconds": 2 * 60 # 时间间隔 - }, - { - "id": "job2", # 任务ID - "func": "util:scan_file_util.scan_VJ103_dir", # 任务位置 - "trigger": "interval", # 触发器 - "seconds": 3 * 60 # 时间间隔 - }, - { - "id": "job3", # 任务ID - "func": "util:scan_file_util.scan_GF3MDJ_dir", # 任务位置 - "trigger": "interval", # 触发器 - "seconds": 5 * 60 # 时间间隔 - }, - { - "id": "job4", # 任务ID - "func": "util:scan_file_util.scan_H08_dir", # 任务位置 - "trigger": "interval", # 触发器 - "seconds": 7 * 60 # 时间间隔 - }, - { - "id": "job5", # 任务ID - "func": "util:scan_file_util.scan_Sentinel1_dir", # 任务位置 - "trigger": "interval", # 触发器 - "seconds": 11 * 60 # 时间间隔 - }, - { - "id": "job6", # 任务ID - "func": "util:scan_file_util.scan_Sentinel2_dir", # 任务位置 - "trigger": "interval", # 触发器 - "seconds": 8 * 60 # 时间间隔 - }, # { - # "id": "job7", # 任务ID - # "func": "util:scan_file_util.scan_Sentinel3OL_dir", # 任务位置 + # "id": "my_job", # 任务ID + # "func": "util:scan_file_util.scan_VJ102_dir", # 任务位置 + # "trigger": "interval", # 触发器 + # "seconds": 2 * 60 # 时间间隔 + # }, + # { + # "id": "job2", # 任务ID + # "func": "util:scan_file_util.scan_VJ103_dir", # 任务位置 + # "trigger": "interval", # 触发器 + # "seconds": 3 * 60 # 时间间隔 + # }, + # { + # "id": "job3", # 任务ID + # "func": "util:scan_file_util.scan_GF3MDJ_dir", # 任务位置 # "trigger": "interval", # 触发器 # "seconds": 5 * 60 # 时间间隔 # }, - { - "id": "job8", # 任务ID - "func": "util:scan_file_util.scan_HJ1_dir", # 任务位置 - "trigger": "interval", # 触发器 - "seconds": 5 * 60 # 时间间隔 - }, - { - "id": "job9", # 任务ID - "func": "util:scan_file_util.scan_ZY3_dir", # 任务位置 - "trigger": "interval", # 触发器 - "seconds": 5 * 60 # 时间间隔 - }, - { - "id": "job10", # 任务ID - "func": "util:scan_file_util.scan_SNPP_dir", # 任务位置 - "trigger": "interval", # 触发器 - "seconds": 5 * 60 # 时间间隔 - } + # { + # "id": "job4", # 任务ID + # "func": "util:scan_file_util.scan_H08_dir", # 任务位置 + # "trigger": "interval", # 触发器 + # "seconds": 7 * 60 # 时间间隔 + # }, + # { + # "id": "job5", # 任务ID + # "func": "util:scan_file_util.scan_Sentinel1_dir", # 任务位置 + # "trigger": "interval", # 触发器 + # "seconds": 11 * 60 # 时间间隔 + # }, + # { + # "id": "job6", # 任务ID + # "func": "util:scan_file_util.scan_Sentinel2_dir", # 任务位置 + # "trigger": "interval", # 触发器 + # "seconds": 8 * 60 # 时间间隔 + # }, + # # { + # # "id": "job7", # 任务ID + # # "func": "util:scan_file_util.scan_Sentinel3OL_dir", # 任务位置 + # # "trigger": "interval", # 触发器 + # # "seconds": 5 * 60 # 时间间隔 + # # }, + # { + # "id": "job8", # 任务ID + # "func": "util:scan_file_util.scan_HJ1_dir", # 任务位置 + # "trigger": "interval", # 触发器 + # "seconds": 5 * 60 # 时间间隔 + # }, + # { + # "id": "job9", # 任务ID + # "func": "util:scan_file_util.scan_ZY3_dir", # 任务位置 + # "trigger": "interval", # 触发器 + # "seconds": 5 * 60 # 时间间隔 + # }, + # { + # "id": "job10", # 任务ID + # "func": "util:scan_file_util.scan_SNPP_dir", # 任务位置 + # "trigger": "interval", # 触发器 + # "seconds": 5 * 60 # 时间间隔 + # } ] } ) diff --git a/util/file_util.py b/util/file_util.py index 89d97e1..4559a7a 100644 --- a/util/file_util.py +++ b/util/file_util.py @@ -18,9 +18,6 @@ from util.http_file_upload import upload_client from util.http_util import httpUtil from util.remote_sensing_util import gf4_pmi_001 from util.xml_util import dict_to_xml -from apscheduler.schedulers.blocking import BlockingScheduler - -sched = BlockingScheduler() def list_dir(file_dir):