|
@@ -4,25 +4,50 @@ from app.api_data.tx_ad_cost import get_cost
|
|
|
from app.etl.dw import dw_image_cost_day
|
|
|
from app.crontab_task import task
|
|
|
from app.etl.MaterialLibrary import MaterialDataClean
|
|
|
+from logging import handlers
|
|
|
+import logging
|
|
|
+
|
|
|
du = DateUtils()
|
|
|
|
|
|
|
|
|
"""凌晨5点跑 为了防止数据提供方数据缺失情况"""
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
-
|
|
|
+ logging.basicConfig(
|
|
|
+ handlers=[
|
|
|
+ logging.handlers.RotatingFileHandler('./log/dailyRun.log',
|
|
|
+ maxBytes=10 * 1024 * 1024,
|
|
|
+ backupCount=5,
|
|
|
+ encoding='utf-8')
|
|
|
+ , logging.StreamHandler()
|
|
|
+ ],
|
|
|
+ level=logging.INFO,
|
|
|
+ format="%(asctime)s - %(levelname)s %(filename)s %(funcName)s %(lineno)s - %(message)s"
|
|
|
+ )
|
|
|
|
|
|
+ logging.info('订单消耗数据获取,开始')
|
|
|
task.daily()
|
|
|
+ logging.info('订单消耗数据获取,结束')
|
|
|
|
|
|
|
|
|
+ logging.info('订单消耗数据处理,开始')
|
|
|
data_stat_run.daily()
|
|
|
+ logging.info('订单消耗数据处理,结束')
|
|
|
|
|
|
|
|
|
+ logging.info('广告数据获取,开始')
|
|
|
get_cost.day()
|
|
|
+ logging.info('广告数据获取,结束')
|
|
|
+
|
|
|
+ logging.info('广告数据处理,开始')
|
|
|
dw_image_cost_day.day()
|
|
|
+ logging.info('广告数据处理,结束')
|
|
|
|
|
|
|
|
|
+ logging.info('素材库数据处理,开始')
|
|
|
MaterialDataClean.run()
|
|
|
+ logging.info('素材库数据处理,结束')
|
|
|
+
|
|
|
|
|
|
|
|
|
|