|
@@ -518,7 +518,7 @@ class Dataflow_ActivteMQ_attachment(Dataflow_attachment):
|
|
conn = getConnection_postgres()
|
|
conn = getConnection_postgres()
|
|
cursor = conn.cursor()
|
|
cursor = conn.cursor()
|
|
cursor.execute(sql)
|
|
cursor.execute(sql)
|
|
- self.conn_attach.commit()
|
|
|
|
|
|
+ conn.commit()
|
|
conn.close()
|
|
conn.close()
|
|
|
|
|
|
|
|
|
|
@@ -1517,4 +1517,8 @@ if __name__ == '__main__':
|
|
# de.start_flow_extract()
|
|
# de.start_flow_extract()
|
|
# fixDoc_to_queue_extract()
|
|
# fixDoc_to_queue_extract()
|
|
# check_data_synchronization()
|
|
# check_data_synchronization()
|
|
- fixDoc_to_queue_init(filename="C:\\Users\\Administrator\\Desktop\\flow_init_2023-02-07.xlsx")
|
|
|
|
|
|
+ # fixDoc_to_queue_init(filename="C:\\Users\\Administrator\\Desktop\\flow_init_2023-02-07.xlsx")
|
|
|
|
+ current_date = getCurrent_date(format="%Y-%m-%d")
|
|
|
|
+ last_date = timeAdd(current_date,-30,format="%Y-%m-%d")
|
|
|
|
+ sql = " delete from attachment where crtime<='%s 00:00:00' "%(last_date)
|
|
|
|
+ print(sql)
|