Skip to content

Commit 73b12f6

Browse files
committed
Merge branch 'develop' into prepare-release-1.7.13
2 parents 6fe5464 + e99aef1 commit 73b12f6

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

eogrow/pipelines/download_batch.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
def _retry_on_404(func: Callable[P, T]) -> Callable[P, T]:
5050
@wraps(func)
5151
def retrying_func(*args: P.args, **kwargs: P.kwargs) -> T:
52-
for wait_time in [0, 10, 100]:
52+
for wait_time in [0, 10, 20, 100]:
5353
time.sleep(wait_time) # if we start monitoring too soon we might hit a 404
5454
try:
5555
return func(*args, **kwargs)
@@ -178,6 +178,7 @@ def run_procedure(self) -> tuple[list[str], list[str]]:
178178
batch_request = self._create_or_collect_batch_request()
179179

180180
user_action = self._trigger_user_action(batch_request)
181+
self._wait_for_sh_db_sync(batch_request)
181182

182183
if user_action is BatchUserAction.ANALYSE or (
183184
user_action is BatchUserAction.START and batch_request.status is not BatchRequestStatus.ANALYSIS_DONE
@@ -308,6 +309,11 @@ def _trigger_user_action(self, batch_request: BatchRequest) -> BatchUserAction:
308309
LOGGER.info("Didn't trigger batch job because current batch request status is %s", status)
309310
return BatchUserAction.NONE
310311

312+
@_retry_on_404
313+
def _wait_for_sh_db_sync(self, batch_request: BatchRequest) -> None:
314+
"""Wait for SH read/write databases to sync."""
315+
self.batch_client.get_request(batch_request)
316+
311317
def cache_batch_area_manager_grid(self, request_id: str) -> None:
312318
"""This method ensures that area manager caches batch grid into the storage."""
313319
if self.area_manager.config.batch_id and self.area_manager.config.batch_id != request_id:

eogrow/utils/pipeline_chain.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ def validate_pipeline_chain(pipeline_chain: list[RawConfig]) -> None:
4040
def run_pipeline_chain(pipeline_chain: list[RawConfig]) -> None:
4141
for run_config in pipeline_chain:
4242
run_schema = PipelineRunSchema.parse_obj(run_config)
43-
runner = _pipeline_runner.options(**run_schema.pipeline_resources) # type: ignore[attr-defined]
44-
ray.get(runner.remote(run_schema.pipeline_config))
43+
runner = _pipeline_runner.options(**run_schema.pipeline_resources)
44+
ray.get(runner.remote(run_schema.pipeline_config)) # type: ignore [arg-type]
4545

4646

4747
@ray.remote(max_retries=0)

0 commit comments

Comments
 (0)