Skip to content

Commit

Permalink
save feed requested flag to DB
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Mar 8, 2024
1 parent 0c2738c commit 98c847b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 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.0"
version: str = "3.9.1"
mongo_username: str = "admin"
mongo_password: str = "admin"
log_level: str = "DEBUG"
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/subprocesses/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def update_workflow_status(key: str, test: bool):
workflow.response = update_workflow_progress(updated_status)
pretty_response = pprint.pformat(workflow.response.__dict__)
logger.debug(f"Updated response: {pretty_response}.", extra=d)
logger.info(f"Current status is {workflow.response.workflow_state}.", extra=d)
update_status_flag(key, workflow, True, test)
logger.info(f"Finished writing updated status to the DB, releasing lock.", extra=d)

Expand Down Expand Up @@ -341,7 +342,6 @@ def _parse_response(
status.status = False
status.error = Error.feed_deleted.value
status.state_progress = "0%"
logger.info(f"Current status is {status.workflow_state}.", extra=d)
return status


Expand Down
2 changes: 2 additions & 0 deletions app/controllers/subprocesses/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def workflow_retrieve_helper(workflow: dict) -> WorkflowDBSchema:
service_retry=workflow["service_retry"],
stale=workflow["stale"],
started=workflow["started"],
feed_requested=True if not workflow.get("feed_requested") else workflow["feed_requested"],
)


Expand All @@ -68,6 +69,7 @@ def workflow_add_helper(workflow: WorkflowDBSchema) -> dict:
"service_retry": workflow.service_retry,
"stale": workflow.stale,
"started": workflow.started,
"feed_requested": workflow.feed_requested,
}


Expand Down

0 comments on commit 98c847b

Please sign in to comment.