소스 검색

generate label for mysql

罗俊辉 1 년 전
부모
커밋
f97ba58dba
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      functions/mysql.py
  2. 1 0
      process_data.py

+ 1 - 1
functions/mysql.py

@@ -106,7 +106,7 @@ class MySQLClientSpider(object):
             self.connection.commit()
             return res
         except Exception as e:
-            print("error", len(sql))
+            print("error", sql)
             print(e)
             self.connection.rollback()
 

+ 1 - 0
process_data.py

@@ -139,6 +139,7 @@ class DataProcessor(object):
             label_obj = label_info.get(label_dt, {}).get(video_id)
             if label_obj:
                 label = int(label_obj["total_return"]) if label_obj["total_return"] else 0
+                print(label)
             else:
                 label = 0
             return label, label_dt