Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file task_result.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111openCore_kerneltypet=|Inputof{id:string;path:string;pass:bool}|Selectof{id:string;dir_path:string;sel:stringlist;pass:bool}|Shellof{id:string;descr:string;outcome:[`Succeeded|`Missing_output|`Failed];exit_code:int;cmd:string;file_dumps:Shell_command.file_dumplist;cache:stringoption;stdout:string;stderr:string;}|Pluginof{id:string;descr:string;outcome:[`Succeeded|`Missing_output|`Failed];msg:stringoption;}|Container_image_fetchof{id:string;outcome:(unit,[`Singularity_failed_pullofint*string])result}letid=function|Input{id;_}|Select{id;_}|Shell{id;_}|Plugin{id;_}|Container_image_fetch{id;_}->idletname=function|Input{id;path;_}->sprintf"input(%s, %s)"idpath|Select{dir_path;sel;_}->sprintf"select(%s, %s)"dir_path(Path.to_stringsel)|Shell{id;descr;_}->sprintf"shell(%s,%s)"descrid|Plugin{id;descr;_}->sprintf"plugin(%s,%s)"descrid|Container_image_fetch{id;_}->sprintf"container_image_fetch(%s)"idletsucceeded_of_outcome=function|`Succeeded->true|`Failed|`Missing_output->falseletsucceeded=function|Input{pass;_}|Select{pass;_}->pass|Container_image_fetchf->f.outcome=Ok()|Plugin{outcome;_}|Shell{outcome;_}->succeeded_of_outcomeoutcomeleterror_short_descr=function|Input{path;_}->sprintf"Input %s doesn't exist"path|Select{dir_path;sel;_}->sprintf"Path %s doesn't exist in %s"(Path.to_stringsel)dir_path|Container_image_fetch_->sprintf"Container image could not be fetched"|Shellx->(matchx.outcomewith|`Missing_output->"Missing output"|`Failed->sprintf"Ended with exit code %d"x.exit_code|`Succeeded->letmsg="Task_outcome.error_short_descr: not an error result"inraise(Invalid_argumentmsg))|Plugino->(matcho.outcomewith|`Missing_output->"Missing output"|`Failed->"Failed"|`Succeeded->letmsg="Task_outcome.error_short_descr: not an error result"inraise(Invalid_argumentmsg))leterror_long_descrxdbbufid=matchxwith|Input_|Select_->()|Plugino->Option.itero.msg~f:(Buffer.add_stringbuf)|Shellx->(bprintfbuf"+------------------------------------------------------------------------------+\n";bprintfbuf"| Submitted script |\n";bprintfbuf"+------------------------------------------------------------------------------+\n";bprintfbuf"%s\n"x.cmd);List.iterx.file_dumps~f:(fun(Shell_command.File_dump{path;text})->bprintfbuf"+------------------------------------------------------------------------------+\n";bprintfbuf"|> Dumped file: %s\n"path;bprintfbuf"+------------------------------------------------------------------------------+\n";bprintfbuf"%s\n"text;);bprintfbuf"#\n";bprintfbuf"+------------------------------------------------------------------------------+\n";bprintfbuf"| STDOUT |\n";bprintfbuf"+------------------------------------------------------------------------------+\n";bprintfbuf"%s\n"(In_channel.read_all(Db.stdoutdbid));bprintfbuf"+------------------------------------------------------------------------------+\n";bprintfbuf"| STDERR |\n";bprintfbuf"+------------------------------------------------------------------------------+\n";bprintfbuf"%s\n"(In_channel.read_all(Db.stderrdbid))|Container_image_fetchx->matchx.outcomewith|Ok()->assertfalse|Error(`Singularity_failed_pull(_,url))->(bprintfbuf"+------------------------------------------------------------------------------+\n";bprintfbuf"| Image URL |\n";bprintfbuf"+------------------------------------------------------------------------------+\n";bprintfbuf"%s\n"url)