|
@@ -12,10 +12,8 @@ class sqlCollect():
|
|
|
"""
|
|
|
@classmethod
|
|
|
def update_task_tencent_material(cls, video_id, oss_object_key):
|
|
|
- current_time = datetime.now()
|
|
|
- formatted_time = current_time.strftime("%Y-%m-%d %H:%M:%S")
|
|
|
- insert_sql = f"""UPDATE ad_put_tencent_material_upload_handle SET video_after_path = '{oss_object_key}', processe_node = 1, update_time = '{formatted_time}' WHERE video_id = {video_id};"""
|
|
|
- data = MysqlHelper.update_values(
|
|
|
+ insert_sql = f"""UPDATE ad_put_tencent_material_upload_handle SET video_after_path = '{oss_object_key}', processe_node = 1 WHERE video_id = {video_id};"""
|
|
|
+ MysqlHelper.update_values(
|
|
|
sql=insert_sql
|
|
|
)
|
|
|
|
|
@@ -27,7 +25,7 @@ class sqlCollect():
|
|
|
def is_video_id(cls):
|
|
|
current_time = datetime.now()
|
|
|
formatted_time = current_time.strftime("%Y-%m-%d")
|
|
|
- sql = f"""SELECT video_id FROM ad_put_tencent_material_upload_handle WHERE processe_node = '0' AND update_time LIKE '{formatted_time}%' AND is_delete = 0;"""
|
|
|
+ sql = f"""SELECT video_id, video_before_path FROM ad_put_tencent_material_upload_handle WHERE processe_node = '0' AND update_time LIKE '{formatted_time}%' AND is_delete = 0;"""
|
|
|
data = MysqlHelper.get_values(sql)
|
|
|
return data
|
|
|
|