Skip to content

Commit

Permalink
workflows: fail properly for author wfs
Browse files Browse the repository at this point in the history
  • Loading branch information
DonHaul committed Dec 19, 2024
1 parent 99a85c8 commit c1e251c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@
"workflow_id": Param(type="string", default=""),
"data": Param(type="object", default={}),
"create_ticket": Param(type="boolean", default=False),
"collection": Param(type="string", default=AUTHORS),
},
start_date=datetime.datetime(2024, 5, 5),
schedule=None,
catchup=False,
on_failure_callback=set_workflow_status_to_error, # TODO: what if callback fails? Data in backoffice not up to date!
tags=["authors"],
tags=[AUTHORS],
)
def author_create_approved_dag():
"""Defines the DAG for the author creation workflow after curator's approval.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
catchup=False,
# TODO: what if callback fails? Data in backoffice not up to date!
on_failure_callback=set_workflow_status_to_error,
tags=["authors"],
tags=[AUTHORS],
)
def author_create_rejected_dag() -> None:
"""
Expand Down
3 changes: 2 additions & 1 deletion workflows/dags/author/author_update/author_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
params={
"workflow_id": Param(type="string", default=""),
"data": Param(type="object", default={}),
"collection": Param(type="string", default=AUTHORS),
},
catchup=False,
on_failure_callback=set_workflow_status_to_error, # TODO: what if callback fails? Data in backoffice not up to date!
tags=["authors"],
tags=[AUTHORS],
)
def author_update_dag():
"""
Expand Down

0 comments on commit c1e251c

Please sign in to comment.