Skip to content

Commit

Permalink
Test with wait_till_path_available for significant timeouts.
Browse files Browse the repository at this point in the history
  • Loading branch information
EmileSonneveld committed Oct 23, 2024
1 parent 38815a3 commit a8a0807
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions openeogeotrellis/deploy/batch_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,10 @@ def run_job(
ml_model_metadata = result.get_model_metadata(str(output_file))
logger.info("Extracted ml model metadata from %s" % output_file)
for name, asset in the_assets_metadata.items():
# TODO: test in separate branch
# if not asset.get("href").lower().startswith("s3:/"):
# # fusemount could have some delay to make files accessible, so poll a bit:
# asset_path = get_abs_path_of_asset(asset["href"], job_dir)
# wait_till_path_available(asset_path)
if not asset.get("href").lower().startswith("s3:/"):
# fusemount could have some delay to make files accessible, so poll a bit:
asset_path = get_abs_path_of_asset(asset["href"], job_dir)
wait_till_path_available(asset_path)
add_permissions(Path(asset["href"]), stat.S_IWGRP)
logger.info(f"wrote {len(the_assets_metadata)} assets to {output_file}")
assets_metadata.append(the_assets_metadata)
Expand Down

0 comments on commit a8a0807

Please sign in to comment.