catching failures

11 views
Skip to first unread message

Mikhail Pachkov

unread,
Apr 19, 2016, 8:24:22 AM4/19/16
to Anduril
Dear All,

We have anduril based pipeline for chipseq data processing. The person who has written it has left and I taking over the project. I want to add the following functionality: if pipeline fails then special script is executed which generate report with data from executed steps, send notification to me etc... However I have not found a way to do this. Is it possible to add special component which is executed in the case of failure?

Thank you in advance!

Best,

Mikhail

Ville Rantanen

unread,
Apr 20, 2016, 3:46:45 AM4/20/16
to Anduril
Hi,

One easy approach is to do this after anduril finishes. If a component fails, anduril exits with non-zero exit code, and you can script what happens next. 
In the $ANDURIL_HOME/utils you'll find a tool  anduril-result-browser -  that can be used to list erroring instances (among other things.. but you may have to install some python dependencies for the tool to work).

also, note that in the log folder there are the individual log files for each component instance with the same name

anduril run workflow --log log_folder -d execution_folder
[[ $? -ne 0 ]] && {
    anduril
-result-browser -e execution_folder
   
    anduril
-result-browser -e execution_folder | tail -n +2 | awk '{ print($1) }' | while read comp; do cat log/$comp;  done    

}


Anduril script does have the structure for switch case branching, and there may be some other solutions for error notifications, but personally i've been using the approach above


Reply all
Reply to author
Forward
0 new messages