IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 8, 2008, 11:01:50 AM (18 years ago)
Author:
eugene
Message:

update automate to do dbname substitution

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/automate.pro

    r16610 r17577  
    33# example automation stage
    44# automate METADATA
    5 #   name       STR DARK
    6 #   check      STR "detselect -search -inst SIMTEST -det_type BIAS -dbname eamtest"
    7 #   launch     STR "dettool -definebyquery -workdir path://EAMWORK -inst SIMTEST -det_type DARK -select_exp_type DARK -dbname eamtest"
     5#  name       STR DARK
     6#  check      STR "detselect -search -inst SIMTEST -det_type BIAS -dbname eamtest"
     7#  ncheck     S32 1
     8#  launch     STR "dettool -definebyquery -workdir path://EAMWORK -inst SIMTEST -det_type DARK -select_exp_type DARK -dbname eamtest"
     9#  block      STR "dettool -runs -active -det_type DARK -dbname eamtest"
    810# END
    911
     
    1517# DONE (action finished)
    1618
    17 # XXX since the state is ephemeral, any stages for which the prereq
    18 # exists will be re-launched every time this tasks is loaded in
    19 # pantasks.  We can add a 'block' stage to test if a given stage has
    20 # already been performed or not...
    21 
    2219macro load.automate
    23   if ($0 != 2)
    24     echo "USAGE: load.automate (filename)"
     20  if ($0 != 3)
     21    echo "USAGE: load.automate (filename) (dbname)"
    2522    break
    2623  end
    2724  queueload tmp -x "cat $MODULES:0/$1"
     25
     26  ## interpolate standard values
     27  queuesubstr tmp @DBNAME@ $2
     28
    2829  ipptool2book tmp automate -key name -uniq -setword pantaskState INIT.BLOCK
    2930  queuedelete tmp
     
    219220    end
    220221
     222    book getword automate $pageName ncheck -var Ncheck
     223    if ("$Ncheck" == "NULL")
     224      $Ncheck = 1
     225    end
    221226    book npages tmpCheck -var Npage
    222     if ($Npage == 0)
     227    if ($Npage < $Ncheck)
    223228      if ($VERBOSE >= 2)
    224229        echo "$pageName not ready for LAUNCH"
Note: See TracChangeset for help on using the changeset viewer.