Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fchabouis committed Mar 7, 2024
1 parent cb39822 commit 7fd8267
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/batid/services/data_gouv_publication.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def publish():


def create_directory():
directory_name = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
directory_name = f"datagouvfr_publication_{datetime.now().strftime("%Y-%m-%d_%H-%M-%S")}"
os.mkdir(directory_name)
return directory_name

Expand Down Expand Up @@ -130,7 +130,7 @@ def upload_to_s3(archive_path):
MAX_PARTS = 1000
# compute the corresponding part size
archive_size = os.path.getsize(archive_path)
part_size = int(archive_size * 1.2 / MAX_PARTS) + 1
part_size = int(archive_size * 1.2 / MAX_PARTS)
config = boto3.s3.transfer.TransferConfig(multipart_chunksize=part_size)

s3.upload_file(
Expand Down

0 comments on commit 7fd8267

Please sign in to comment.