Skip to content

Commit

Permalink
handle inflight cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Mar 11, 2024
1 parent 26d309b commit 2c5ee9c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class Settings(BaseSettings):
pflink_mongodb: MongoDsn = 'mongodb://localhost:27017'
version: str = "3.9.3"
version: str = "3.9.4"
mongo_username: str = "admin"
mongo_password: str = "admin"
log_level: str = "DEBUG"
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/subprocesses/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def workflow_retrieve_helper(workflow: dict) -> WorkflowDBSchema:
service_retry=workflow["service_retry"],
stale=workflow["stale"],
started=workflow["started"],
feed_requested=False if not workflow.get("feed_requested") else workflow["feed_requested"],
feed_requested= False if "feed_requested" not in workflow else workflow["feed_requested"]
)


Expand Down
4 changes: 2 additions & 2 deletions app/controllers/subprocesses/wf_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ def manage_workflow(db_key: str, test: bool):

case State.REGISTERING:
logger.info(f"Registering progress is {workflow.response.state_progress} complete.", extra=d)
logger.info(f"Current feed request status is {workflow.feed_requested}", extra=d)

if workflow.response.state_progress == "100%" and pl_inst_id==0:
logger.info(f"Previous plugin instance ID is {pl_inst_id}", extra=d)
if workflow.response.state_progress == "100%" and not workflow.feed_requested:
try:
resp = do_cube_create_feed(request, cube_url, workflow.service_retry)
pl_inst_id = resp["pl_inst_id"]
Expand Down

0 comments on commit 2c5ee9c

Please sign in to comment.