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

Feature Request: workflow.onStart event handler #1138

Closed
csawye01 opened this issue May 3, 2019 · 4 comments
Closed

Feature Request: workflow.onStart event handler #1138

csawye01 opened this issue May 3, 2019 · 4 comments
Labels

Comments

@csawye01
Copy link

csawye01 commented May 3, 2019

New feature

A workflow.onStart (like workflow.onComplete) event handler for pipelines.

Usage scenario

It would be useful if a Nextflow pipeline could send a notification email that says the workflow has started in a situation where the pipeline is automatically triggered at the presence of specific files in a directory.

Suggest implementation

May be able to reuse some of the code developed for workflow.onComplete event handler to implement the workflow start event handler.

@stale
Copy link

stale bot commented Apr 27, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 27, 2020
@pditommaso pditommaso added stale and removed wontfix labels Apr 27, 2020
@stale stale bot closed this as completed Jun 26, 2020
@SamStudio8
Copy link

@pditommaso Is this still wontfix? It is an unfortunate API choice to support onComplete and onError but not onStart. It would be nice to be able to fully decouple any "housekeeping" from the workflow itself, but at the moment we're left with no choice but to pollute the entrypoint workflow with any "onStart" activities; while post-workflow housekeeping is treated differently and can be separated into the handlers provided.

@pditommaso
Copy link
Member

The rationale was the start of the execution is the execution of the script itself. However, using DSL2, this could make more sense.

What's your use case?

@SamStudio8
Copy link

@pditommaso Our use case is nothing that can't be done in the start of the workflow (eg. notifications), it's just the API in its current form is asymmetric. We have workflow complete/error handling notifications in their own handlers, but workflow start handling must be placed inside the workflow itself. It would be cleaner for user code and clearer for the language to introduce an onStart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants