Commit cdf6d44c by fangxingjun

no message

parent f60670e5
......@@ -145,11 +145,19 @@ class PicturesIdIndex(Templates):
pq.write_table(table, f"{self.local_path}/{self.hdfs_block_name}.parquet")
def update_state_after_save(self):
while True:
try:
with self.engine_doris.begin() as conn:
sql_update = text(
f"UPDATE {self.tn_pics_hdfs_index} SET state=3 WHERE state=2 and id={self.id};")
print("sql_update:", sql_update)
conn.execute(sql_update)
break
except Exception as e:
print(f"更新数据错误: {e}", traceback.format_exc())
time.sleep(5)
self.engine_doris = DBUtil.get_db_engine(db_type=DbTypes.doris.name, site_name=self.site_name)
continue
def run(self):
while True:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment