ck 3 лет назад
Родитель
Сommit
2bfc116258
3 измененных файлов с 8 добавлено и 8 удалено
  1. 3 3
      app/api_data/get_cost_older.py
  2. 3 3
      app/etl/MaterialLibrary/MaterialDataClean.py
  3. 2 2
      app/task.py

+ 3 - 3
app/api_data/get_cost_older.py

@@ -149,15 +149,15 @@ def old_cost_hourly():
     st = et =du.getNow()
     run(st, et)
 
-def daily():
+def old_cost_daily():
     st = du.get_n_days(-10)
     et = du.get_n_days(-1)
     run(st, et)
 
 if __name__ == '__main__':
 
-    run()
-
+    # run()
+    old_cost_daily()
 
 
 

+ 3 - 3
app/etl/MaterialLibrary/MaterialDataClean.py

@@ -12,12 +12,12 @@ def title():
         sum(click_count) click_times,
         sum(view_count) view_times,
         group_concat(distinct book) novels,
-        max(dt) end_date,min(dt) start_date
+        max(dt) end_date,min(dt) start_date 
         from dw_image_cost_day where title!='' and title is not null  GROUP BY REPLACE(REPLACE(title, CHAR(10), ''), CHAR(13), '')  limit 1000
 				"""
 
     df =  db.dm.getData_pd(sql)
-    print(df)
+    # print(df)
     df["data_type"] = 'all'
     df['type'] = 1
     df['create_by'] = 0
@@ -39,7 +39,7 @@ def description():
     				"""
 
     df = db.dm.getData_pd(sql)
-    print(df)
+    # print(df)
 
     df["data_type"] = 'all'
     df['type'] = 2

+ 2 - 2
app/task.py

@@ -1,7 +1,7 @@
 
 import threading
 from app.api_data.get_order import *
-from app.api_data.get_cost_older import old_cost_hourly
+from app.api_data.get_cost_older import old_cost_hourly,old_cost_daily
 from app.etl.sync_to_ck_task import order_sync_ck
 
 def hourly():
@@ -50,7 +50,7 @@ def daily():
     t7 = threading.Thread(target=yueweng,args=(st,et))
     t8 = threading.Thread(target=yangguang,args=(st,et))
     t9 = threading.Thread(target=youshuge,args=(st,et))
-    t10 = threading.Thread(target=old_cost_hourly,args=(st,et))
+    t10 = threading.Thread(target=old_cost_daily,args=(st,et))
     t1.start()
     t1.join()
     t2.start()