瀏覽代碼

generate label for mysql

罗俊辉 1 年之前
父節點
當前提交
3ca9297289
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      process_data.py

+ 1 - 2
process_data.py

@@ -152,8 +152,7 @@ class DataProcessor(object):
             insert_sql = f"""INSERT INTO lightgbm_data (video_title, label, daily_dt_str) values ('{title}', '{label}', '{dt_daily}';"""
             await self.client_spider.update(insert_sql)
 
-
-        select_sql = "SELECT video_id, hour_dt_str FROM lightgbm_data where label is NULL;"
+        select_sql = "SELECT video_id, hour_dt_str FROM lightgbm_data where label is NULL and hour_dt_str < '20240327';"
         init_data_tuple = self.client_spider.select(select_sql)
         init_list = list(init_data_tuple)
         async_tasks = []