Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify and cleanup on workflow crash #456

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions em_workflows/brt/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,10 @@ def get_callback_result(callback_data: list) -> list:
utils.notify_api_completion,
utils.copy_workdirs_and_cleanup_hook,
],
on_crashed=[
utils.notify_api_completion,
utils.copy_workdirs_and_cleanup_hook,
],
)
def brt_flow(
# This block of params map are for adoc file specfication.
Expand Down
4 changes: 4 additions & 0 deletions em_workflows/czi/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ def update_file_metadata(file_path: FilePath, callback_with_zarr: Dict) -> Dict:
utils.notify_api_completion,
utils.copy_workdirs_and_cleanup_hook,
],
on_crashed=[
utils.notify_api_completion,
utils.copy_workdirs_and_cleanup_hook,
],
)
async def czi_flow(
file_share: str,
Expand Down
4 changes: 4 additions & 0 deletions em_workflows/dm_conversion/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ def scale_jpegs(file_path: FilePath, size: str) -> Optional[dict]:
utils.notify_api_completion,
utils.copy_workdirs_and_cleanup_hook,
],
on_crashed=[
utils.notify_api_completion,
utils.copy_workdirs_and_cleanup_hook,
],
)
def dm_flow(
file_share: str,
Expand Down
4 changes: 4 additions & 0 deletions em_workflows/lrg_2d_rgb/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ def gen_thumb(file_path: FilePath):
utils.notify_api_completion,
utils.copy_workdirs_and_cleanup_hook,
],
on_crashed=[
utils.notify_api_completion,
utils.copy_workdirs_and_cleanup_hook,
],
)
# run_config=LocalRun(labels=[utils.get_environment()]),
def lrg_2d_flow(
Expand Down
4 changes: 4 additions & 0 deletions em_workflows/sem_tomo/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ def gen_ng_metadata(fp_in: FilePath) -> Dict:
utils.notify_api_completion,
utils.copy_workdirs_and_cleanup_hook,
],
on_crashed=[
utils.notify_api_completion,
utils.copy_workdirs_and_cleanup_hook,
],
)
def sem_tomo_flow(
file_share: str,
Expand Down
Loading