Skip to content

Commit

Permalink
tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnestaP committed Oct 2, 2023
1 parent b8e6507 commit f817d71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions dags/common/pull_ftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def migrate_files(
repo.save(s3_filename, io.BytesIO(zip_file_content))
if repo.is_meta(s3_filename):
extracted_filenames.append("extracted/" + s3_filename)
repo.save(s3_filename, io.BytesIO(zip_file_content))
repo.save(_file, file_bytes)

elif tarfile.is_tarfile(file_bytes):
file_bytes.seek(0)
Expand All @@ -48,7 +48,8 @@ def migrate_files(
repo.save(s3_filename, io.BytesIO(tar_file_content))
if repo.is_meta(s3_filename):
extracted_filenames.append("extracted/" + s3_filename)
repo.save(s3_filename, io.BytesIO(tar_file_content))
repo.save(_file, file_bytes)

else:
logger.info(
"File is not zip or tar, processing the next one", file_name=_file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def trigger_file_processing(
publisher="elsevier", repo=repo, logger=logger, filenames=filenames or []
)

# filenames = migrate_from_ftp()
filenames = migrate_from_ftp()
# trigger_file_processing(filenames=filenames)


Expand Down

0 comments on commit f817d71

Please sign in to comment.