Open nick-youngblut opened 3 weeks ago
It would be helpful to include docs on how to run a subprocess in the completion handler. For instance:
workflow.onComplete{ def proc = ['./bin/final_checks.sh'].execute() proc.waitForProcessOutput() }
...or another example:
workflow.onComplete { if (!workflow.success) { def proc = ['./bin/run_llm_model_to_eval_the_error.sh'].execute() def output = new StringBuffer() def error = new StringBuffer() proc.consumeProcessOutput(output, error) proc.waitFor() if (proc.exitValue() != 0) { println "Error running LLM model script: ${error.toString()}" } else { println "LLM model script output: ${output.toString()}" } } }
Currently the completion handler docs just discuss workflow introspection:
workflow.onComplete { println "Pipeline completed at: $workflow.complete" println "Execution status: ${ workflow.success ? 'OK' : 'failed' }" }
It would be helpful to include docs on how to run a subprocess in the completion handler. For instance:
...or another example:
Currently the completion handler docs just discuss workflow introspection: