Bladeren bron

MOD:消耗数据修复

cxyu 3 jaren geleden
bovenliggende
commit
bcf5039ea3

+ 0 - 1
app/api_data/tx_ad_cost/get_cost_older.py

@@ -147,7 +147,6 @@ def mysql_insert_daily_qq(data):
 def get_daily_vx(st, et):
     token_list_v = get_vx_list()
     logging.info("获取vx账号:" + str(token_list_v.__len__()))
-
     time1 = time.time()
     executor = ThreadPoolExecutor(max_workers=10)
     li = []

+ 1 - 1
app/crontab_task/dailyRun.py

@@ -15,7 +15,7 @@ du = DateUtils()
 if __name__ == '__main__':
     logging.basicConfig(
         handlers=[
-            logging.handlers.RotatingFileHandler('./log/dailyRun.log',
+            logging.handlers.RotatingFileHandler('./log/GameDailyRun.log',
                                                  maxBytes=10 * 1024 * 1024,
                                                  backupCount=5,
                                                  encoding='utf-8')

+ 1 - 1
app/crontab_task/hourlyRun.py

@@ -10,7 +10,7 @@ import logging
 if __name__ == '__main__':
     logging.basicConfig(
         handlers=[
-            logging.handlers.RotatingFileHandler('./log/hourlyRun.log',
+            logging.handlers.RotatingFileHandler('./log/GameHourlyRun.log',
                                                  maxBytes=10 * 1024 * 1024,
                                                  backupCount=5,
                                                  encoding='utf-8')

+ 16 - 2
app/crontab_task/task.py

@@ -21,7 +21,7 @@ def hourly():
 def daily():
 
     t11 = threading.Thread(target=old_cost_daily, args=())
-    t12 = threading.Thread(target=insert_order_data_daily())
+    t12 = threading.Thread(target=insert_order_data_daily)
 
     t11.start()
     t11.join()
@@ -39,5 +39,19 @@ def cost_yestoday_repair():
 
 
 if __name__ == '__main__':
-    hourly()
+    import logging
+    from logging import handlers
+    logging.basicConfig(
+        handlers=[
+            logging.handlers.RotatingFileHandler('task.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"
+    )
+    # hourly()
     # cost_yestoday_repair()
+    daily()