Skip to content

Commit

Permalink
Fix for Remine ticket #10927: the server processes files are deleted …
Browse files Browse the repository at this point in the history
…only if the pipeline's exit code is 0. (#2252)

This should facilitate debugging in some cases.
  • Loading branch information
nicolasbrossard authored and driusan committed Oct 14, 2016
1 parent c3c6fa8 commit 247f2f3
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,20 @@ class MriUploadServerProcess extends AbstractServerProcess
{
return self::PROCESS_TYPE;
}

/**
* Whether $outfile, $_errfile and $_exitCodeFile should be deleted once the
* process is finished. These files will be deleted only if the pipeline
* executed successfully (i.e. with exit code 0).
*
* @return boolean true if the files should be deleted, false otherwise
*/
public function deleteProcessFiles()
{
$exitCode = parent::getExitCode();

return !is_null($exitCode) && is_numeric($exitCode) && $exitCode == 0;
}
}

?>

0 comments on commit 247f2f3

Please sign in to comment.