PMCC-BioinformaticsCore / janis-core

Core python modules for Janis Pipeline workflow assistant
GNU General Public License v3.0
4 stars 9 forks source link

wanted: janis wait #50

Closed drtconway closed 3 years ago

drtconway commented 3 years ago

Hi Janis,

It'd be really nice to have a command

janis wait myworkflowid

which waits until the referenced workflow completes.

Bonus marks:

Partial credit:

Motivation

For reasons of practicality, I have multiple workflows for different parts of a project: alignment, variant calling, copy number, etc. These also get run on different inputs.

It would be nice to be able to write a simple shell script that at least in theory can rerun them all. Assuming no failures, this would make a relatively simple way to document the overall workflow for a large project.

I guess in you could kind of run

janis watch myworkflowid > /dev/null 2>&1

but that almost certainly does quite a lot more work than necessary.

illusional commented 3 years ago

Implemented and released in v0.11.0, where wid below is the workflow ID or the execution path (usually <output-dir>/janis):

$ janis wait --help
usage: janis wait [-h] wid [wid ...]

positional arguments:
  wid         Workflows to wait for

optional arguments:
  -h, --help  show this help message and exit

Example:

janis wait /path/to/workflow1/janis aed123d

This exits with rc=3 if any of the workflows to watch fail.