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

Add preview to workflow runtime metadata #4478

Closed
kelly-sovacool opened this issue Nov 2, 2023 · 1 comment · Fixed by #4985
Closed

Add preview to workflow runtime metadata #4478

kelly-sovacool opened this issue Nov 2, 2023 · 1 comment · Fixed by #4985

Comments

@kelly-sovacool
Copy link

kelly-sovacool commented Nov 2, 2023

New feature

The workflow object has many useful properties, such as stubRun to indicate whether the workflow was invoked with the -stub/-stub-run CLI option. Similarly, it would be useful to access whether -preview was used.

Usage scenario

This is especially useful in the onComplete handler, e.g. to only send an email notification for "real" pipeline runs.

workflow.onComplete {
    if (!workflow.stubRun && !workflow.preview) {
        sendMail(...)
    }
}

Suggest implementation

Similar logic could be re-used from the other metadata that's populated from the CLI.

@greenberga
Copy link
Contributor

If it's okay, I'll take a crack at this feature!

greenberga added a commit to greenberga/nextflow that referenced this issue May 9, 2024
Includes a boolean property on the workflow metadata object
representing whether the current run is in preview mode.

Closes nextflow-io#4478
greenberga added a commit to greenberga/nextflow that referenced this issue May 9, 2024
Includes a boolean property on the workflow metadata object
representing whether the current run is in preview mode.

Closes nextflow-io#4478

Signed-off-by: Aaron Greenberg <[email protected]>
greenberga added a commit to greenberga/nextflow that referenced this issue May 12, 2024
Includes a boolean property on the workflow metadata object
representing whether the current run is in preview mode.

Closes nextflow-io#4478

Signed-off-by: Aaron Greenberg <[email protected]>
@bentsherman bentsherman linked a pull request May 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants