Loading bbox-log-lock-code.pl +20 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,26 @@ sub lock_release { return 1; } # workflow_complete: Create a file to avoid re-running workflow for a run. # $runfolder: The path to the directory where the marker file should be placed. sub workflow_complete { my ($runfolder) = @_; dolog("Creating workflow-complete.txt marker file\n"); my $complete_path = "$runfolder/workflow-complete.txt"; my $complete_handle; open($complete_handle, '>', $complete_path) or do { dolog(<<"EOF"); Unable to open the workflow-complete.txt file for writing! Tried to open this file: $complete_path Here is the error we received: $! EOF return 0; }; print $complete_handle 'Workflow completed at ', localtime(time()), "\n"; close($complete_handle); return 1; } # End on a true value. 1; bbox-workflow-miseq +7 −13 Original line number Diff line number Diff line Loading @@ -281,6 +281,7 @@ EOL # If we timed out, then exit. if ($TIMEOUT1 == 0) { dolog("Gave up waiting for $RUNFOLDER/RTAComplete.txt\n"); workflow_complete($RUNFOLDER); log_failure("Gave up waiting for RTAComplete.txt to appear", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, $LOG); Loading @@ -297,6 +298,7 @@ Please make sure you are running this command with a valid run folder! The directory we are trying to open is: $basecalls_path The error we are getting is: $! EOF workflow_complete($RUNFOLDER); return; }; while (readdir($basecalls_handle)) { Loading Loading @@ -345,6 +347,7 @@ There was a problem starting the analysis command. The command we tried to run was $runcommand_string The error we got was: $@ EOF workflow_complete($RUNFOLDER); email_failure('Problem starting the analysis command', 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, Loading @@ -369,6 +372,7 @@ EOF dolog("That's good! 8-)\n"); email_analysis($RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, $RealBin, $RealScript) or do { workflow_complete($RUNFOLDER); email_failure('Problems sending the post-analysis mail', 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, Loading @@ -376,25 +380,15 @@ EOF }; } else { dolog("That's bad 8-(\n"); workflow_complete($RUNFOLDER); email_failure('The analysis program had an error', 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, $RealBin, $RealScript); } dolog("Creating workflow-complete.txt marker file\n"); my $complete_path = "$RUNFOLDER/workflow-complete.txt"; my $complete_handle; open($complete_handle, '>', $complete_path) or do { dolog(<<"EOF"); Unable to open the workflow-complete.txt file for writing! Tried to open this file: $complete_path Here is the error we received: $! EOF return; }; print $complete_handle 'Workflow completed at ', localtime(time()), "\n"; close($complete_handle); # Create the completion marker workflow_complete($RUNFOLDER); }; Loading bbox-workflow-nextseq +14 −13 Original line number Diff line number Diff line Loading @@ -298,6 +298,7 @@ EOL # If we timed out, then exit. if ($TIMEOUT2 == 0) { dolog("Gave up waiting for $RUNFOLDER/RTAComplete.txt\n"); workflow_complete($RUNFOLDER); email_failure("Gave up waiting for RTAComplete.txt to appear", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, Loading @@ -321,6 +322,7 @@ EOL # If we timed out, then exit. if ($TIMEOUT2 == 0) { dolog("Gave up waiting for $RUNFOLDER/RunCompletionStatus.xml\n"); workflow_complete($RUNFOLDER); email_failure("Gave up waiting for RunCompletionStatus.xml", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, Loading @@ -337,6 +339,7 @@ We got an error when trying to open RunCompletionStatus.xml. The full path we tried to open is: $RUNFOLDER/RunCompletionStatus.xml The error we got is: $! EOF workflow_complete($RUNFOLDER); email_failure("Could not open RunCompletionStatus.xml", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, $RealBin, $RealScript); Loading @@ -356,6 +359,7 @@ EOF We have a completed run, but the CompletionStatus is not "CompletedAsPlanned". The completion status we found is: $1 EOF workflow_complete($RUNFOLDER); email_failure("Un-good CompletionStatus", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, Loading @@ -375,6 +379,7 @@ We got an error when trying to open RunParameters.xml. The full path we tried to open is: $RUNFOLDER/RunParameters.xml The error we got is: $! EOF workflow_complete($RUNFOLDER); email_failure("Could not open RunParameters.xml", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, $RealBin, $RealScript); Loading @@ -394,6 +399,7 @@ EOF dolog(<<"EOF"); We were unable to find a LibraryID inside RunParameters.xml. EOF workflow_complete($RUNFOLDER); email_failure("Could not find a LibraryID", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, Loading @@ -408,6 +414,7 @@ EOF Unable to access the Google Drive folder containing the samplesheets. The folder we are trying to access is: $DRIVEPATH EOF workflow_complete($RUNFOLDER); email_failure("Could not access gdrive folder", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, $RealBin, $RealScript); return; Loading Loading @@ -442,6 +449,7 @@ EOF my $samplesheet_path; if (scalar(@samplesheets) == 0) { dolog("No samplesheets found!\n"); workflow_complete($RUNFOLDER); email_failure("No samplesheets found for $LIBRARYID", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, $RealBin, $RealScript); Loading Loading @@ -481,6 +489,7 @@ The file we tried to copy is: $samplesheet_path The destination was: $RUNFOLDER/SampleSheet.csv The error is: $! EOF workflow_complete($RUNFOLDER); email_failure('Unable to copy SampleSheet.csv into place', 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, $RealBin, $RealScript); Loading Loading @@ -545,6 +554,7 @@ There was a problem starting the analysis command. The command we tried to run was $runcommand_string The error we got was: $@ EOF workflow_complete($RUNFOLDER); email_failure('Problem starting the analysis command', 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, Loading @@ -569,6 +579,7 @@ EOF dolog("That's good! 8-)\n"); email_analysis($RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, $RealBin, $RealScript) or do { workflow_complete($RUNFOLDER); email_failure('Problems sending the post-analysis mail', 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, Loading @@ -576,25 +587,15 @@ EOF }; } else { dolog("That's bad 8-(\n"); workflow_complete($RUNFOLDER); email_failure('The analysis program had an error', 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, $RealBin, $RealScript); } dolog("Creating workflow-complete.txt marker file\n"); my $complete_path = "$RUNFOLDER/workflow-complete.txt"; my $complete_handle; open($complete_handle, '>', $complete_path) or do { dolog(<<"EOF"); Unable to open the workflow-complete.txt file for writing! Tried to open this file: $complete_path Here is the error we received: $! EOF return; }; print $complete_handle 'Workflow completed at ', localtime(time()), "\n"; close($complete_handle); # Create the completion marker workflow_complete($RUNFOLDER); }; Loading Loading
bbox-log-lock-code.pl +20 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,26 @@ sub lock_release { return 1; } # workflow_complete: Create a file to avoid re-running workflow for a run. # $runfolder: The path to the directory where the marker file should be placed. sub workflow_complete { my ($runfolder) = @_; dolog("Creating workflow-complete.txt marker file\n"); my $complete_path = "$runfolder/workflow-complete.txt"; my $complete_handle; open($complete_handle, '>', $complete_path) or do { dolog(<<"EOF"); Unable to open the workflow-complete.txt file for writing! Tried to open this file: $complete_path Here is the error we received: $! EOF return 0; }; print $complete_handle 'Workflow completed at ', localtime(time()), "\n"; close($complete_handle); return 1; } # End on a true value. 1;
bbox-workflow-miseq +7 −13 Original line number Diff line number Diff line Loading @@ -281,6 +281,7 @@ EOL # If we timed out, then exit. if ($TIMEOUT1 == 0) { dolog("Gave up waiting for $RUNFOLDER/RTAComplete.txt\n"); workflow_complete($RUNFOLDER); log_failure("Gave up waiting for RTAComplete.txt to appear", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, $LOG); Loading @@ -297,6 +298,7 @@ Please make sure you are running this command with a valid run folder! The directory we are trying to open is: $basecalls_path The error we are getting is: $! EOF workflow_complete($RUNFOLDER); return; }; while (readdir($basecalls_handle)) { Loading Loading @@ -345,6 +347,7 @@ There was a problem starting the analysis command. The command we tried to run was $runcommand_string The error we got was: $@ EOF workflow_complete($RUNFOLDER); email_failure('Problem starting the analysis command', 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, Loading @@ -369,6 +372,7 @@ EOF dolog("That's good! 8-)\n"); email_analysis($RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, $RealBin, $RealScript) or do { workflow_complete($RUNFOLDER); email_failure('Problems sending the post-analysis mail', 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, Loading @@ -376,25 +380,15 @@ EOF }; } else { dolog("That's bad 8-(\n"); workflow_complete($RUNFOLDER); email_failure('The analysis program had an error', 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, $RealBin, $RealScript); } dolog("Creating workflow-complete.txt marker file\n"); my $complete_path = "$RUNFOLDER/workflow-complete.txt"; my $complete_handle; open($complete_handle, '>', $complete_path) or do { dolog(<<"EOF"); Unable to open the workflow-complete.txt file for writing! Tried to open this file: $complete_path Here is the error we received: $! EOF return; }; print $complete_handle 'Workflow completed at ', localtime(time()), "\n"; close($complete_handle); # Create the completion marker workflow_complete($RUNFOLDER); }; Loading
bbox-workflow-nextseq +14 −13 Original line number Diff line number Diff line Loading @@ -298,6 +298,7 @@ EOL # If we timed out, then exit. if ($TIMEOUT2 == 0) { dolog("Gave up waiting for $RUNFOLDER/RTAComplete.txt\n"); workflow_complete($RUNFOLDER); email_failure("Gave up waiting for RTAComplete.txt to appear", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, Loading @@ -321,6 +322,7 @@ EOL # If we timed out, then exit. if ($TIMEOUT2 == 0) { dolog("Gave up waiting for $RUNFOLDER/RunCompletionStatus.xml\n"); workflow_complete($RUNFOLDER); email_failure("Gave up waiting for RunCompletionStatus.xml", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, Loading @@ -337,6 +339,7 @@ We got an error when trying to open RunCompletionStatus.xml. The full path we tried to open is: $RUNFOLDER/RunCompletionStatus.xml The error we got is: $! EOF workflow_complete($RUNFOLDER); email_failure("Could not open RunCompletionStatus.xml", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, $RealBin, $RealScript); Loading @@ -356,6 +359,7 @@ EOF We have a completed run, but the CompletionStatus is not "CompletedAsPlanned". The completion status we found is: $1 EOF workflow_complete($RUNFOLDER); email_failure("Un-good CompletionStatus", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, Loading @@ -375,6 +379,7 @@ We got an error when trying to open RunParameters.xml. The full path we tried to open is: $RUNFOLDER/RunParameters.xml The error we got is: $! EOF workflow_complete($RUNFOLDER); email_failure("Could not open RunParameters.xml", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, $RealBin, $RealScript); Loading @@ -394,6 +399,7 @@ EOF dolog(<<"EOF"); We were unable to find a LibraryID inside RunParameters.xml. EOF workflow_complete($RUNFOLDER); email_failure("Could not find a LibraryID", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, Loading @@ -408,6 +414,7 @@ EOF Unable to access the Google Drive folder containing the samplesheets. The folder we are trying to access is: $DRIVEPATH EOF workflow_complete($RUNFOLDER); email_failure("Could not access gdrive folder", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, $RealBin, $RealScript); return; Loading Loading @@ -442,6 +449,7 @@ EOF my $samplesheet_path; if (scalar(@samplesheets) == 0) { dolog("No samplesheets found!\n"); workflow_complete($RUNFOLDER); email_failure("No samplesheets found for $LIBRARYID", 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, $RealBin, $RealScript); Loading Loading @@ -481,6 +489,7 @@ The file we tried to copy is: $samplesheet_path The destination was: $RUNFOLDER/SampleSheet.csv The error is: $! EOF workflow_complete($RUNFOLDER); email_failure('Unable to copy SampleSheet.csv into place', 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, $RealBin, $RealScript); Loading Loading @@ -545,6 +554,7 @@ There was a problem starting the analysis command. The command we tried to run was $runcommand_string The error we got was: $@ EOF workflow_complete($RUNFOLDER); email_failure('Problem starting the analysis command', 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, Loading @@ -569,6 +579,7 @@ EOF dolog("That's good! 8-)\n"); email_analysis($RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, $RealBin, $RealScript) or do { workflow_complete($RUNFOLDER); email_failure('Problems sending the post-analysis mail', 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, Loading @@ -576,25 +587,15 @@ EOF }; } else { dolog("That's bad 8-(\n"); workflow_complete($RUNFOLDER); email_failure('The analysis program had an error', 'run', $RUNFOLDER, "$RealBin/email-recipients.txt", $LOGPATH, \$LOG, $RealBin, $RealScript); } dolog("Creating workflow-complete.txt marker file\n"); my $complete_path = "$RUNFOLDER/workflow-complete.txt"; my $complete_handle; open($complete_handle, '>', $complete_path) or do { dolog(<<"EOF"); Unable to open the workflow-complete.txt file for writing! Tried to open this file: $complete_path Here is the error we received: $! EOF return; }; print $complete_handle 'Workflow completed at ', localtime(time()), "\n"; close($complete_handle); # Create the completion marker workflow_complete($RUNFOLDER); }; Loading