Skip to content

Commit

Permalink
check pl inst id before creating feed
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Mar 6, 2024
1 parent b7d273c commit 8c92dec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 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.8.8"
version: str = "3.8.9"
mongo_username: str = "admin"
mongo_password: str = "admin"
log_level: str = "DEBUG"
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/subprocesses/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def update_workflow_progress(response: WorkflowStatusResponseSchema):
Update the overall workflow progress of a workflow from its current
workflow state.
"""
MAX_STATE = 7
MAX_STATE = 6
index = 0
for elem in State:
if response.workflow_state == elem:
Expand Down Expand Up @@ -319,10 +319,10 @@ def _parse_response(
return status

if cube_response:
status.workflow_state = State.FEED_CREATED
status.workflow_state = State.ANALYZING
status.feed_name = cube_response['name']
status.feed_id = cube_response['id']
status.state_progress = "100%"
status.state_progress = "0%"

# check if analysis is scheduled
analysis = get_analysis_status(cube_response)
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/subprocesses/wf_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ def manage_workflow(db_key: str, test: bool):
case State.REGISTERING:
logger.info(f"Registering progress is {workflow.response.state_progress} complete.", extra=d)

if workflow.response.state_progress == "100%" and workflow.stale and not workflow.response.feed_id:
if workflow.response.state_progress == "100%" and workflow.stale and pl_inst_id ==0:
logger.info(f"feed id is {workflow.response.feed_id}", extra=d)
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 8c92dec

Please sign in to comment.