e46c2148e1d280975b160ad98202d6ea4a2739ab
markd
  Fri Jul 31 15:40:54 2020 -0700
added ability to pass through parasol -priority option doBlastzChainNet.pl and probably all HgAutomate stuff.  Keep us bottom feeders where we belong

diff --git src/hg/utils/automation/HgAutomate.pm src/hg/utils/automation/HgAutomate.pm
index 6ae649c..febfb61 100755
--- src/hg/utils/automation/HgAutomate.pm
+++ src/hg/utils/automation/HgAutomate.pm
@@ -413,64 +413,68 @@
 #########################################################################
 # Support for command line options expected to be common to many
 # automation scripts:
 
 use vars qw( @commonOptionVars @commonOptionSpec );
 
 # Common option defaults:
 my $defaultVerbose = 1;
 
 @commonOptionVars = qw(
     $opt_workhorse
     $opt_fileServer
     $opt_dbHost
     $opt_bigClusterHub
     $opt_smallClusterHub
+    $opt_priority
     $opt_debug
     $opt_verbose
     $opt_help
     );
 
 @commonOptionSpec = ("workhorse=s",
 		     "fileServer=s",
 		     "dbHost=s",
 		     "bigClusterHub=s",
 		     "smallClusterHub=s",
+		     "priority=n",
 		     "verbose=n",
 		     "debug",
 		     "help",
 		    );
 
 my %optionHelpText = ( 'workhorse' =>
 '    -workhorse machine    Use machine (default: %s) for compute or
                           memory-intensive steps.
 ',
 		       'fileServer' =>
 '    -fileServer mach      Use mach (default: fileServer of the build directory)
                           for I/O-intensive steps.
 ',
 		       'dbHost' =>
 '    -dbHost mach          Use mach (default: %s) as database server.
 ',
 		       'bigClusterHub' =>
 '    -bigClusterHub mach   Use mach (default: %s) as parasol hub
                           for cluster runs with very large job counts.
 ',
 		       'smallClusterHub' =>
 '    -smallClusterHub mach Use mach (default: %s) as parasol hub
                           for cluster runs with smallish job counts.
 ',
+'    -priority num        Use this priority fo= parasol jobs.
+',
 		       'debug' =>
 '    -debug                Don\'t actually run commands, just display them.
 ',
 		       'verbose' =>
 '    -verbose num          Set verbose level to num (default %d).
 ',
 		       'help' =>
 '    -help                 Show detailed help and exit.
 ',
 		     );
 
 my %optionDefaultDefaults = ( 'workhorse' => 'least loaded',
 			      'dbHost' => $defaultDbHost,
 			      'bigClusterHub' => 'most available',
 			      'smallClusterHub' => 'most available',
@@ -582,31 +586,35 @@
 	"-continue $step.\n" .
 	"If it really doesn't exist, either fix things manually or " .
 	"try -continue $prevStep\n";
       $problem = 1;
     }
   }
   exit 1 if ($problem);
 }
 
 sub paraRun {
  my $para = '/parasol/bin/para';
  if ( ! -e "$para" ) {
     # allow PATH to find the para command
     $para = "para";
  }
- return ("$para make jobList\n" .
+ my $pargs = "";
+ if (defined $main::opt_priority) {
+     $pargs .= "-priority=$main::opt_priority";
+ }
+ return ("$para make $pargs jobList\n" .
 "$para check\n" .
 "$para time > run.time\n" .
 'cat run.time');
 }
 
 sub gensub2 {
  my $answer = '/parasol/bin/gensub2';
  if ( ! -s "$answer" ) {
     # allow PATH to find the gensub2 command
     $answer = "gensub2";
   }
  return $answer;
 }
 
 sub closeStdin {