405a64d015eb7dd55a4bbfb533f463f7b9a4c23c
hiram
  Tue Jun 11 10:32:25 2024 -0700
prevent this procedure from running on top of an existing process no redmine

diff --git src/hg/utils/automation/doSimpleRepeat.pl src/hg/utils/automation/doSimpleRepeat.pl
index 354a557..1fc05f4 100755
--- src/hg/utils/automation/doSimpleRepeat.pl
+++ src/hg/utils/automation/doSimpleRepeat.pl
@@ -116,30 +116,34 @@
 		      @HgAutomate::commonOptionSpec,
 		      );
   &usage(1) if (!$ok);
   &usage(0, 1) if ($opt_help);
   &HgAutomate::processCommonOptions();
   my $err = $stepper->processOptions();
   usage(1) if ($err);
   $dbHost = $opt_dbHost if ($opt_dbHost);
 }
 
 
 #########################################################################
 # * step: trf [smallClusterHub or workhorse depending on genome size]
 sub doCluster {
   my $runDir = "$buildDir/run.cluster";
+  if (-e "$runDir/jobList" && ! $opt_debug) {
+    die "doCluster looks like this is running or was run before and failed\n" .
+      "check $runDir.\n";
+  }
   &HgAutomate::mustMkdir($runDir);
 
   my $paraHub = $opt_smallClusterHub ? $opt_smallClusterHub :
     &HgAutomate::chooseSmallClusterByBandwidth();
   my @okIn = grep !/scratch/,
     &HgAutomate::chooseFilesystemsForCluster($paraHub, "in");
   my @okOut =
     &HgAutomate::chooseFilesystemsForCluster($paraHub, "out");
   if (scalar(@okOut) > 1) {
     @okOut = grep !/$okIn[0]/, @okOut;
   }
   my $inHive = 0;
   $inHive = 1 if ($okIn[0] =~ m#/hive/data/genomes#);
   my $clusterSeqDir = "$okIn[0]/$db";
   $clusterSeqDir = "$buildDir" if ($opt_unmaskedSeq);