Skip to content

Commit

Permalink
Correcting a mistake--need to return an OrchestratorResult object, or…
Browse files Browse the repository at this point in the history
… else the task is failed
  • Loading branch information
jonaraphael committed Nov 9, 2023
1 parent 5ba02d7 commit 789240b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cerulean_cloud/cloud_run_orchestrator/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,4 +548,4 @@ async def _orchestrate(
del out_fc_offset_2
else:
print(f"{start_time}: WARNING: Operating as a DRY RUN!!")
return "Success"
return OrchestratorResult(status="Success")
13 changes: 7 additions & 6 deletions cerulean_cloud/cloud_run_orchestrator/schema.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""schema for orchestration enpoint"""
from typing import Optional

import geojson
# import geojson
from pydantic import BaseModel


Expand All @@ -22,8 +22,9 @@ class OrchestratorResult(BaseModel):
orchestrator result from the model
"""

classification_base: geojson.FeatureCollection
classification_offset: geojson.FeatureCollection
classification_merged: geojson.FeatureCollection
ntiles: int
noffsettiles: int
# classification_base: geojson.FeatureCollection
# classification_offset: geojson.FeatureCollection
# classification_merged: geojson.FeatureCollection
# ntiles: int
# noffsettiles: int
status: str

0 comments on commit 789240b

Please sign in to comment.