Skip to content

Commit

Permalink
revert changes in here
Browse files Browse the repository at this point in the history
  • Loading branch information
Dert1129 committed Nov 7, 2024
1 parent fdf2332 commit a9e0998
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions data_management/services/dlu_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ def update_dlu_package(self, package_id: str, fields_values: dict):
query = "UPDATE data_manager_data_v SET " + query_info["set_clause"] + " WHERE dlu_package_id = %s"
self.db.insert_data(query, values)

def insert_dlu_file(self, dlu_fileName, dlu_package_id, dlu_file_id, dlu_filesize, dlu_md5checksum, dlu_metadata):
def insert_dlu_file(self, values):
query = "INSERT INTO dlu_file (dlu_fileName, dlu_package_id, dlu_file_id, dlu_filesize, dlu_md5checksum, dlu_metadata) VALUES(%s, %s, %s, %s, %s, %s)"
return self.db.insert_data(
query,
(dlu_fileName, dlu_package_id, dlu_file_id, dlu_filesize, dlu_md5checksum, dlu_metadata,),)
self.db.insert_data(query, values)
return query % values

def insert_dlu_files(self, package_id: str, file_list: List[DLUFile]):
logger.info(f"Inserting files for package {package_id}")
for file in file_list:
self.insert_dlu_file(file.name, package_id, file.file_id, file.size, file.checksum, json.dumps(file.metadata))
query_string = self.insert_dlu_file((file.name, package_id, file.file_id, file.size, file.checksum, json.dumps(file.metadata)))
logger.info(query_string)

def get_ready_to_move(self, package_id: str):
package_record = self.db.get_data(
Expand Down

0 comments on commit a9e0998

Please sign in to comment.