Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve logging for upload-files #614

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/dsp_tools/fast_xmlupload/upload_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ def _upload_files_in_parallel(
result: list[tuple[Path, bool]] = []
for uploaded in as_completed(upload_jobs):
result.append(uploaded.result())
if len(result) % 1000 == 0:
print(f"{datetime.now()}: Uploaded {len(result)} files so far, continue...")
return result
jnussbaum marked this conversation as resolved.
Show resolved Hide resolved


Expand Down Expand Up @@ -384,6 +386,9 @@ def upload_files(
"""
dir_with_processed_files_path = _check_processed_dir(dir_with_processed_files)
pkl_file_paths = get_pkl_files()
logger.info("Found the following pickle files:")
for pkl in pkl_file_paths:
logger.info(f" - {str(pkl)}")

# read paths from pkl file
internal_filenames_of_processed_files = _get_paths_from_pkl_files(pkl_files=pkl_file_paths)
jnussbaum marked this conversation as resolved.
Show resolved Hide resolved
Expand Down