Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Masterain98 committed Mar 10, 2024
1 parent 3390c4a commit 5c2a4ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,13 @@ def raw_resource_handler(remote_path: str = "/raw", overwrite: bool = True):
print(f"Create {sub_dir} result: {result}")
else:
print(f"{sub_dir} found.")

# remote_path needs end with /
if not remote_path.endswith("/"):
remote_path = remote_path + "/"

with concurrent.futures.ThreadPoolExecutor(max_workers=os.cpu_count()) as executor:
futures = {executor.submit(upload_file_executor, file, "/raw/", client, overwrite) for file in raw_file}
futures = {executor.submit(upload_file_executor, file, remote_path, client, overwrite) for file in raw_file}
done, not_done = concurrent.futures.wait(futures, timeout=120)


Expand Down

0 comments on commit 5c2a4ca

Please sign in to comment.