Skip to content

Commit

Permalink
move fsync calls
Browse files Browse the repository at this point in the history
  • Loading branch information
EmileSonneveld committed Oct 22, 2024
1 parent 861fd00 commit b0f48c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openeogeotrellis/deploy/batch_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ def run_job(
logger.debug("Starting process graph evaluation")
pg_copy = deepcopy(process_graph)
result = ProcessGraphDeserializer.evaluate(process_graph, env=env, do_dry_run=tracer)
os.fsync(os.open(job_dir, os.O_RDONLY)) # experiment
logger.info("Evaluated process graph, result (type {t}): {r!r}".format(t=type(result), r=result))

if isinstance(result, DelayedVector):
Expand Down Expand Up @@ -350,6 +349,7 @@ def run_job(
logger.error("samply_by_feature was set, but no geometries provided through filter_spatial. "
"Make sure to provide geometries.")
the_assets_metadata = result.write_assets(str(output_file))
os.fsync(os.open(job_dir, os.O_RDONLY)) # experiment
if isinstance(result, MlModelResult):
ml_model_metadata = result.get_model_metadata(str(output_file))
logger.info("Extracted ml model metadata from %s" % output_file)
Expand Down Expand Up @@ -444,6 +444,7 @@ def run_job(
ml_model_metadata=ml_model_metadata,
)

os.fsync(os.open(job_dir, os.O_RDONLY)) # experiment
assert len(results) == len(assets_metadata)
for result, result_assets_metadata in zip(results, assets_metadata):
_export_workspace(
Expand Down

0 comments on commit b0f48c4

Please sign in to comment.