IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 3, 2011, 2:51:02 PM (15 years ago)
Author:
bills
Message:

Changes to support storing distribution bundles in nebulous

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/dist_defineruns.pl

    r29068 r30489  
    4242
    4343# Parse the command-line arguments
    44 my ($stage, $stage_limit, $dist_root, $no_magic);
     44my ($stage, $stage_limit, $dist_root, $workdir, $no_magic);
    4545my ($dbname, $save_temps, $verbose, $no_update, $logfile);
    4646my @labels;
     
    4949           'stage=s'        => \$stage,      # stage to queue
    5050           'label=s'        => \@labels,     # labels
     51           'workdir=s'      => \$workdir,     # workdir
    5152           'stage_limit=s'  => \$stage_limit,# maximum number of runs queued for each stage
    52            'dist_root=s'    => \$dist_root,  # root of distribution work area
     53#           'dist_root=s'    => \$dist_root,  # root of distribution work area
    5354           'no_magic'       => \$no_magic,   # queue runs without requiring magic (for testing only)
    5455           'dbname=s'       => \$dbname,     # Database name
     
    6667$ipprc->redirect_output($logfile) if $logfile;
    6768
    68 if (!$dist_root) {
    69     $dist_root = metadataLookupStr($ipprc->{_siteConfig}, "DISTRIBUTION_ROOT");
    70     &my_die("failed to find DISTRIBUTION_ROOT in site configuration", $PS_EXIT_CONFIG_ERROR) if !$dist_root;
     69if (!$workdir) {
     70    print "workdir not supplied will use DISTRIBUTION_ROOT\n";
     71    # old method where we set workdir based on a config file
     72    if (!$dist_root) {
     73        $dist_root = metadataLookupStr($ipprc->{_siteConfig}, "DISTRIBUTION_ROOT");
     74        &my_die("failed to find DISTRIBUTION_ROOT in site configuration", $PS_EXIT_CONFIG_ERROR) if !$dist_root;
     75    }
     76
     77    my ($day, $month, $year) = (gmtime)[3,4,5];
     78    my $datestr = sprintf "%04d%02d%02d", $year+1900, $month + 1, $day;
     79
     80    $workdir = $dist_root . "/$datestr";
     81
     82    print "workdir is $workdir\n";
    7183}
    72 
    73 my ($day, $month, $year) = (gmtime)[3,4,5];
    74 my $datestr = sprintf "%04d%02d%02d", $year+1900, $month + 1, $day;
    75 
    76 my $workdir = "$dist_root/$datestr";
    77 
    78 print "workdir is $workdir\n";
    7984
    8085# if stage is not supplied as an argument, loop over all stages
     
    9095        my $command = "$disttool -definebyquery -stage $stage -workdir $workdir -label $label";
    9196        $command .= " -no_magic" if $no_magic;
    92         $command .= " -dry_run" if $no_update;
     97        $command .= " -pretend" if $no_update;
    9398        $command .= " -limit $stage_limit" if $stage_limit;
    9499        $command .= " -set_label $label";
Note: See TracChangeset for help on using the changeset viewer.