IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38243


Ignore:
Timestamp:
May 7, 2015, 2:10:21 PM (11 years ago)
Author:
watersc1
Message:

updated multi-database nightly science

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20141024/ippTasks/nightly_science.pro

    r35881 r38243  
    55macro nightly.science.on
    66    ns.initday.on
    7     ns.detrends.off
     7#    ns.detrends.off
    88    ns.dqstats.on
    99    ns.stacks.on
     
    1313macro nightly.science.off
    1414    ns.initday.off
    15     ns.detrends.off
     15#    ns.detrends.off
    1616    ns.dqstats.off
    1717    ns.stacks.off
     
    3333end
    3434
    35 macro ns.detrends.on
    36   task ns.detrends.load
    37     active true
    38   end
    39 end
    4035
    4136macro ns.dqstats.on
     
    4641
    4742macro ns.stacks.on
    48   task ns.stacks.load
    49     active false
    50   end
    5143  task ns.stacks.run
    5244    active true
    5345  end
    54   task ns.stacks.confirm
    55     active false
    56   end
    5746end
    5847
    5948macro ns.diffs.on
    60   task ns.diffs.load
    61     active false
    62   end
    6349  task ns.diffs.run
    6450    active true
     
    7258end
    7359
    74 macro ns.detrends.off
    75   task ns.detrends.load
    76     active false
    77   end
    78 end
    79 
    8060macro ns.dqstats.off
    8161  task ns.dqstats.load
     
    8565
    8666macro ns.stacks.off
    87   task ns.stacks.load
    88     active false
    89   end
    9067  task ns.stacks.run
    9168    active false
    9269  end
    93   task ns.stacks.confirm
    94     active false
    95   end
    96 
    9770end
    9871
    9972macro ns.diffs.off
    100   task ns.diffs.load
    101     active false
    102   end
    10373  task ns.diffs.run
    104     active false
    105   end
    106 end
    107 
    108 macro ns.stacks.confirm.on
    109   task ns.stacks.confirm
    110     active true
    111   end
    112 end
    113 
    114 macro ns.stacks.confirm.off
    115   task ns.stacks.confirm
    11674    active false
    11775  end
     
    12886book init nsDiffs
    12987book init nsStacks
     88
     89# Hard coded values
     90$camera_map:gpc1 = "GPC1"
     91$camera_map:gpc2 = "GPC2"
     92
     93# Macro to manage the camera maps
     94macro ns.add.camera_map
     95    if ($0 != 3)
     96        echo "USAGE: ns.add.camera_map (dbname) (camera)"
     97        break
     98    end
     99
     100    $camera_map:$1 = $2
     101end
     102
    130103#
    131104# Macros to control the book.
    132105#
    133106macro ns.add.date
    134   if ($0 != 2)
    135     echo "USAGE: ns.add.date (YYYY-MM-DD)"
     107  if ($0 != 4)
     108    echo "USAGE: ns.add.date (YYYY-MM-DD) (dbname) (camera)"
    136109    break
    137110  end
    138111
    139    book newpage nsData $1
    140    book setword nsData $1 nsState NEW
    141    book setword nsData $1 dbname $DB:0
    142 
    143    book newpage nsDiffs $1
    144    book setword nsDiffs $1 nsDiffState TOWARP
    145    book setword nsDiffs $1 nsObservingState UNKNOWN
    146 
    147    book newpage nsStacks $1
    148    book setword nsStacks $1 nsStackState TOWARP
     112   if ($?camera_map:$2)
     113      if ($camera_map:$2 != "$3")
     114         echo "camera $3 does not match expected camera $camera_map:$2"
     115         break
     116      end
     117   else
     118      echo "dbname $2 does not have a camera_map entry"
     119      break
     120   end
     121
     122   # build key from date and database name
     123   sprintf key "%s-%s" $1 $2
     124   book newpage nsData $key
     125   book setword nsData $key nsState NEW
     126   book setword nsData $key date $1
     127   book setword nsData $key dbname $2
     128   book setword nsData $key camera $3
     129
     130   book newpage nsDiffs $key
     131   book setword nsDiffs $key nsDiffState TOWARP
     132   book setword nsDiffs $key nsObservingState UNKNOWN
     133
     134   book newpage nsStacks $key
     135   book setword nsStacks $key nsStackState TOWARP
    149136
    150137end
     
    153140    book npages nsData -var Npages
    154141    for i 0 $Npages
    155        book getpage nsData $i -var date
    156        book getword nsData $date nsState -var state
    157        book getword nsStacks $date nsStackState -var Sstate
    158        book getword nsDiffs $date nsDiffState -var Dstate
    159        book getword nsDiffs $date nsObservingState -var Ostate
    160        echo $date $state $Sstate $Dstate $Ostate
     142       book getpage nsData $i -var key
     143       book getword nsData $key date -var date
     144       book getword nsData $key dbname -var dbname
     145       book getword nsData $key camera -var camera
     146       book getword nsData $key nsState -var state
     147       book getword nsStacks $key nsStackState -var Sstate
     148       book getword nsDiffs $key nsDiffState -var Dstate
     149       book getword nsDiffs $key nsObservingState -var Ostate
     150# I've moved dbname to end as czartool reads information from here, and it may be fixed length
     151       echo $key $date $state $Sstate $Dstate $Ostate $dbname $camera
     152
    161153    end
    162154end
     
    179171  periods         -exec $LOADEXEC
    180172  periods         -timeout 300
    181   trange          0:00:00 1:00:00 -nmax 1
     173  trange          0:00:00 1:00:00 -nmax 2
    182174  npending        1
    183175
     
    186178    stderr $LOGDIR/ns.initday.log
    187179    $today = `date -u +%Y-%m-%d`
    188     book newpage nsData $today
    189     book setword nsData $today nsState NEW
    190     book newpage nsStacks $today
    191     book setword nsStacks $today nsStackState TOWARP
    192     book newpage nsDiffs $today
    193     book setword nsDiffs $today nsDiffState TOWARP
    194     book setword nsData $today dbname $DB:0
    195 
    196 #    command echo $today
    197    $run = nightly_science.pl --clean_old --date $today --dbname $DB:0
    198 #    add_standard_args run
    199     command $run
     180    # loop over all databases
     181    for i 0 $DB:n
     182        $thisDB = $DB:$i
     183        sprintf key "%s-%s" $today $thisDB
     184        book newpage nsData $key
     185        book setword nsData $key date $today
     186        book setword nsData $key nsState NEW
     187        book setword nsData $key dbname $thisDB
     188        book setword nsData $key camera $camera_map:$thisDB
     189
     190        book newpage nsStacks $key
     191        book setword nsStacks $key date $today
     192        book setword nsStacks $key nsStackState TOWARP
     193        book newpage nsDiffs $key
     194        book setword nsDiffs $key date $today
     195        book setword nsDiffs $key nsDiffState TOWARP
     196
     197       #command echo $today
     198       $run = nightly_science.pl --clean_old --date $today --dbname $thisDB --camera $camera_map:$thisDB
     199       command $run
     200    end
    200201  end
    201202
     
    217218
    218219#
    219 # Queue off any possible detrend verification runs
    220 #
    221 task              ns.detrends.load
    222   host            local
    223   periods         -poll $LOADPOLL
    224   periods         -exec $LOADEXEC
    225   periods         -timeout 30
    226   trange          23:00:00 23:59:59 -nmax 1
    227   npending        1
    228 
    229   task.exec
    230     stdout $LOGDIR/ns.detrends.log
    231     stdout $LOGDIR/ns.detrends.log
    232     $today = `date -u +%Y-%m-%d`
    233 
    234     $run = nightly_science.pl --queue_detrends --date $today --dbname $DB:0
    235 #     add_standard_args $run
    236      command $run
    237   end
    238  
    239   task.exit       0
    240     # nothign to do here
    241   end
    242   # locked list
    243   task.exit       default
    244     showcommand failure
    245   end
    246   task.exit       crash
    247     showcommand crash
    248   end
    249   # operation times out
    250   task.exit       timeout
    251     showcommand timeout
    252   end
    253 end
    254 
    255 #
    256220# Queue dqstats runs
    257221#
     222
     223# CZW: 2015-05-05 One day we will stop making these, but that day is not today. 
     224#      According to Ken, we do not need to implement this for gpc2, as nothing is
     225#      written on the OTIS/scheduler side to accept these products.  We should
     226#      continue to generate these for gpc1, as the machinery does exist to check
     227#      for them, and not generating them may cause that to fail (even if nothing
     228#      is done with the results).
     229
    258230task              ns.dqstats.load
    259231  host            local
     
    270242    $today = `date -u +%Y-%m-%d`
    271243
    272     $run = nightly_science.pl --queue_dqstats --date $today --dbname $DB:0
     244    $run = nightly_science.pl --queue_dqstats --date $today --dbname gpc1 --camera GPC1
    273245#     add_standard_args $run
    274246     command $run
     
    288260  # operation times out
    289261  task.exit       timeout
    290     showcommand timeout
    291   end
    292 end
    293 
    294 #
    295 # Check to see if the warps are finished
    296 #
    297 task              ns.stacks.load
    298   active          false
    299   host            local
    300   periods         -poll $LOADPOLL
    301   periods         -exec $LOADEXEC
    302   periods         -timeout 120
    303   npending        1
    304 
    305   task.exec
    306      stdout NULL
    307      stderr $LOGDIR/ns.stacks.log
    308 
    309      book getpage nsData $ns_stackPAGE -var date
    310      book getword nsStacks $date nsStackState -var ns_STATE
    311      book getword nsDiffs $date nsDiffState -var ns_diff_STATE
    312      book getword nsData $date dbname -var DBNAME
    313      book npages nsData -var Npages
    314 
    315     if ($VERBOSE > 5)
    316        echo "ns.stacks.load: " $ns_stackPAGE $date $ns_STATE $Npages
    317     end
    318 
    319      $ns_stackPAGE ++
    320      if ($ns_stackPAGE >= $Npages) set ns_stackPAGE = 0
    321      option $date
    322 
    323      if ("$ns_STATE" != "TOWARP") break
    324 
    325      $run = nightly_science.pl --check_stacks --date $date --dbname $DBNAME
    326 #     add_standard_args $run
    327      command $run
    328 
    329    end
    330 
    331   # success
    332   task.exit   0
    333 #    convert 'stdout' to book format
    334     book delpage nsStacks $options:0
    335     ipptool2book stdout nsStacks -uniq -key date
    336 
    337     book getword nsStacks $options:0 nsNmacros -var ns_Nmacros
    338     if ("$ns_Nmacros" != "NULL")
    339         for i 0 $ns_Nmacros
    340             sprintf macroName "ns%dMacro" $i
    341             book getword nsStacks $options:0 $macroName -var macroCmd
    342             $macroCmd
    343         end
    344     end
    345 
    346     if ($VERBOSE > 2)
    347         book listbook nsData
    348     end
    349   end
    350 
    351   # locked list
    352   task.exit    default
    353     showcommand failure
    354   end
    355   task.exit    crash
    356     showcommand crash
    357   end
    358   #operation times out?
    359   task.exit    timeout
    360262    showcommand timeout
    361263  end
     
    377279     stderr $LOGDIR/ns.stacks.log
    378280
    379      book getpage nsData $ns_RstackPAGE -var date
    380      book getword nsStacks $date nsStackState -var ns_STATE
    381      book getword nsDiffs $date nsDiffState -var ns_diff_STATE
    382      book getword nsData $date dbname -var DBNAME
     281     book getpage nsData $ns_RstackPAGE -var key
     282     book getword nsStacks $key date -var date
     283     book getword nsStacks $key nsStackState -var ns_STATE
     284     book getword nsDiffs $key nsDiffState -var ns_diff_STATE
     285     book getword nsData $key dbname -var DBNAME
     286     book getword nsData $key camera -var CAMERA
    383287     book npages nsData -var Npages
    384288
    385289    if ($VERBOSE > 5)
    386        echo "ns.stacks.run: " $ns_RstackPAGE $date $ns_STATE $Npages
     290       echo "ns.stacks.run: " $ns_RstackPAGE $key $date $ns_STATE $Npages
    387291    end
    388292
    389293     $ns_RstackPAGE ++
    390294     if ($ns_RstackPAGE >= $Npages) set ns_RstackPAGE = 0
    391      option $date
     295     option $key
    392296
    393297     if (("$ns_STATE" != "STACKING")&&("$ns_STATE" != "TOWARP")&&("$ns_STATE" != "FORCETOWARP")) break
    394      $run = nightly_science.pl --queue_stacks --date $date --dbname $DBNAME
     298     $run = nightly_science.pl --queue_stacks --date $date --dbname $DBNAME --camera $CAMERA
    395299#     add_standard_args $run
    396300     command $run
     
    430334end
    431335
    432 #
    433 # Confirm that all the stacks that can be built have been built, or at least attempted.
    434 #
    435 task              ns.stacks.confirm
    436   active          false
    437   host            local
    438   periods         -poll $LOADPOLL
    439   periods         -exec $LOADEXEC
    440   periods         -timeout 120
    441   npending        1
    442 
    443   task.exec
    444      stdout NULL
    445      stderr $LOGDIR/ns.stacks.log
    446 
    447      book getpage nsData $ns_CstackPAGE -var date
    448      book getword nsStacks $date nsStackState -var ns_STATE
    449      book getword nsData $date dbname -var DBNAME
    450      book npages nsData -var Npages
    451 
    452      if ($VERBOSE > 5)
    453         echo "ns.stacks.confirm: " $ns_CstackPAGE $date $ns_STATE $Npages
    454      end
    455 
    456      $ns_CstackPAGE ++
    457      if ($ns_CstackPAGE >= $Npages) set ns_CstackPAGE = 0
    458      option $date
    459 
    460      if ("$ns_STATE" != "STACKING") break
    461      $run = nightly_science.pl --confirm_stacks --date $date --dbname $DBNAME
    462 #     add_standard_args $run
    463      command $run
    464    end
    465   # success
    466   task.exit   0
    467 #    convert 'stdout' to book format
    468     book delpage nsStacks $options:0
    469     ipptool2book stdout nsStacks -uniq -key date
    470 
    471     book getword nsStacks $options:0 nsNmacros -var ns_Nmacros
    472     if ("$ns_Nmacros" != "NULL")
    473         for i 0 $ns_Nmacros
    474             sprintf macroName "ns%dMacro" $i
    475             book getword nsStacks $options:0 $macroName -var macroCmd
    476             $macroCmd
    477         end
    478     end
    479 
    480     if ($VERBOSE > 2)
    481         book listbook nsData
    482     end
    483   end
    484 
    485   # locked list
    486   task.exit    default
    487     showcommand failure
    488   end
    489   task.exit    crash
    490     showcommand crash
    491   end
    492   #operation times out?
    493   task.exit    timeout
    494     showcommand timeout
    495   end
    496 end
    497 
    498 
    499 #
    500 # Check to see if the warps are finished
    501 #
    502 task              ns.diffs.load
    503   active          false
    504   host            local
    505   periods         -poll $LOADPOLL
    506   periods         -exec $LOADEXEC
    507   periods         -timeout 120
    508   npending        1
    509 
    510   task.exec
    511      stdout NULL
    512      stderr $LOGDIR/ns.diffs.log
    513 
    514      book getpage nsData $ns_diffPAGE -var date
    515      book getword nsDiffs $date nsDiffState -var ns_STATE
    516      book getword nsStacks $date nsStackState -var ns_stack_STATE
    517      book getword nsData $date dbname -var DBNAME
    518      book npages nsData -var Npages
    519 
    520     if ($VERBOSE > 5)
    521        echo "ns.diffs.load: " $ns_diffPAGE $date $ns_STATE $Npages
    522     end
    523 
    524      $ns_diffPAGE ++
    525      if ($ns_diffPAGE >= $Npages) set ns_diffPAGE = 0
    526      option $date
    527 
    528      if ("$ns_STATE" != "TOWARP") break
    529      $run = nightly_science.pl --check_diffs --date $date --dbname $DBNAME
    530 #     add_standard_args $run
    531      command $run
    532    end
    533 
    534   # success
    535   task.exit   0
    536 #    convert 'stdout' to book format
    537     book delpage nsDiffs $options:0
    538     ipptool2book stdout nsDiffs -uniq -key date
    539 
    540     book getword nsDiffs $options:0 nsNmacros -var ns_Nmacros
    541     if ("$ns_Nmacros" != "NULL")
    542         for i 0 $ns_Nmacros
    543             sprintf macroName "ns%dMacro" $i
    544             book getword nsDiffs $options:0 $macroName -var macroCmd
    545             $macroCmd
    546         end
    547     end
    548 
    549     if ($VERBOSE > 2)
    550         book listbook nsData
    551     end
    552   end
    553 
    554   # locked list
    555   task.exit    default
    556     showcommand failure
    557   end
    558   task.exit    crash
    559     showcommand crash
    560   end
    561   #operation times out?
    562   task.exit    timeout
    563     showcommand timeout
    564   end
    565 end
    566336
    567337#
     
    580350     stderr $LOGDIR/ns.diffs.log
    581351
    582      book getpage nsData $ns_RdiffPAGE -var date
    583      book getword nsDiffs $date nsDiffState -var ns_STATE
    584      book getword nsStacks $date nsStackState -var ns_stack_STATE
    585      book getword nsData $date dbname -var DBNAME
     352     book getpage nsData $ns_RdiffPAGE -var key
     353     book getword nsDiffs $key date -var date
     354     book getword nsDiffs $key nsDiffState -var ns_STATE
     355     book getword nsStacks $key nsStackState -var ns_stack_STATE
     356     book getword nsData $key dbname -var DBNAME
     357     book getword nsData $key camera -var CAMERA
    586358     book npages nsData -var Npages
    587359
     
    592364     $ns_RdiffPAGE ++
    593365     if ($ns_RdiffPAGE >= $Npages) set ns_RdiffPAGE = 0
    594      option $date
     366     option $key
    595367
    596368     if (("$ns_STATE" != "DIFFING")&&("$ns_STATE" != "QUEUEDIFFS")&&("$ns_STATE" != "TOWARP")&&("$ns_STATE" != "FORCETOWARP")) break
    597      $run = nightly_science.pl --queue_diffs --date $date --dbname $DBNAME
     369     $run = nightly_science.pl --queue_diffs --date $date --dbname $DBNAME --camera $CAMERA
    598370#     add_standard_args $run
    599371     command $run
     
    635407
    636408
     409# This is the graveyard of tasks that we've defined in the past, but either never use, or never let go active.
     410
     411# if (0)
     412
     413
     414# macro ns.detrends.on
     415#   task ns.detrends.load
     416#     active true
     417#   end
     418# end
     419
     420
     421# macro ns.detrends.off
     422#   task ns.detrends.load
     423#     active false
     424#   end
     425# end
     426
     427# macro ns.stacks.confirm.on
     428#   task ns.stacks.confirm
     429#     active true
     430#   end
     431# end
     432
     433# macro ns.stacks.confirm.off
     434#   task ns.stacks.confirm
     435#     active false
     436#   end
     437# end
     438
     439
     440
     441
     442
     443# #
     444# # Queue off any possible detrend verification runs
     445# #
     446# task              ns.detrends.load
     447#   host            local
     448#   periods         -poll $LOADPOLL
     449#   periods         -exec $LOADEXEC
     450#   periods         -timeout 30
     451#   trange          23:00:00 23:59:59 -nmax 1
     452#   npending        1
     453
     454#   task.exec
     455#     stdout $LOGDIR/ns.detrends.log
     456#     stdout $LOGDIR/ns.detrends.log
     457#     $today = `date -u +%Y-%m-%d`
     458
     459#     $run = nightly_science.pl --queue_detrends --date $today --dbname $DB:0
     460# #     add_standard_args $run
     461#      command $run
     462#   end
     463 
     464#   task.exit       0
     465#     # nothign to do here
     466#   end
     467#   # locked list
     468#   task.exit       default
     469#     showcommand failure
     470#   end
     471#   task.exit       crash
     472#     showcommand crash
     473#   end
     474#   # operation times out
     475#   task.exit       timeout
     476#     showcommand timeout
     477#   end
     478# end
     479
     480
     481# #
     482# # Check to see if the warps are finished
     483# #
     484# task              ns.stacks.load
     485#   active          false
     486#   host            local
     487#   periods         -poll $LOADPOLL
     488#   periods         -exec $LOADEXEC
     489#   periods         -timeout 120
     490#   npending        1
     491
     492#   task.exec
     493#      stdout NULL
     494#      stderr $LOGDIR/ns.stacks.log
     495
     496#      book getpage nsData $ns_stackPAGE -var key
     497#      book getword nsStacks $key date -var date
     498#      book getword nsStacks $key nsStackState -var ns_STATE
     499#      book getword nsDiffs $key nsDiffState -var ns_diff_STATE
     500#      book getword nsData $key dbname -var DBNAME
     501#      book npages nsData -var Npages
     502
     503#     if ($VERBOSE > 5)
     504#        echo "ns.stacks.load: " $ns_stackPAGE $date $DBNAME $ns_STATE $Npages
     505#     end
     506
     507#      $ns_stackPAGE ++
     508#      if ($ns_stackPAGE >= $Npages) set ns_stackPAGE = 0
     509#      option $key
     510
     511#      if ("$ns_STATE" != "TOWARP") break
     512
     513#      $run = nightly_science.pl --check_stacks --date $date --dbname $DBNAME
     514# #     add_standard_args $run
     515#      command $run
     516
     517#    end
     518
     519#   # success
     520#   task.exit   0
     521# #    convert 'stdout' to book format
     522#     book delpage nsStacks $options:0
     523#     ipptool2book stdout nsStacks -uniq -key date
     524
     525#     book getword nsStacks $options:0 nsNmacros -var ns_Nmacros
     526#     if ("$ns_Nmacros" != "NULL")
     527#       for i 0 $ns_Nmacros
     528#           sprintf macroName "ns%dMacro" $i
     529#           book getword nsStacks $options:0 $macroName -var macroCmd
     530#           $macroCmd
     531#       end
     532#     end
     533
     534#     if ($VERBOSE > 2)
     535#       book listbook nsData
     536#     end
     537#   end
     538
     539#   # locked list
     540#   task.exit    default
     541#     showcommand failure
     542#   end
     543#   task.exit    crash
     544#     showcommand crash
     545#   end
     546#   #operation times out?
     547#   task.exit    timeout
     548#     showcommand timeout
     549#   end
     550# end
     551
     552# #
     553# # Confirm that all the stacks that can be built have been built, or at least attempted.
     554# #
     555# task              ns.stacks.confirm
     556#   active          false
     557#   host            local
     558#   periods         -poll $LOADPOLL
     559#   periods         -exec $LOADEXEC
     560#   periods         -timeout 120
     561#   npending        1
     562
     563#   task.exec
     564#      stdout NULL
     565#      stderr $LOGDIR/ns.stacks.log
     566
     567#      book getpage nsData $ns_CstackPAGE -var key
     568#      book getword nsStacks $key date -var date
     569#      book getword nsStacks $key nsStackState -var ns_STATE
     570#      book getword nsData $key dbname -var DBNAME
     571#      book npages nsData -var Npages
     572
     573#      if ($VERBOSE > 5)
     574#       echo "ns.stacks.confirm: " $ns_CstackPAGE $key $date $DBNAME $ns_STATE $Npages
     575#      end
     576
     577#      $ns_CstackPAGE ++
     578#      if ($ns_CstackPAGE >= $Npages) set ns_CstackPAGE = 0
     579#      option $key
     580
     581#      if ("$ns_STATE" != "STACKING") break
     582#      $run = nightly_science.pl --confirm_stacks --date $date --dbname $DBNAME
     583# #     add_standard_args $run
     584#      command $run
     585#    end
     586#   # success
     587#   task.exit   0
     588# #    convert 'stdout' to book format
     589#     book delpage nsStacks $options:0
     590#     ipptool2book stdout nsStacks -uniq -key date
     591
     592#     book getword nsStacks $options:0 nsNmacros -var ns_Nmacros
     593#     if ("$ns_Nmacros" != "NULL")
     594#       for i 0 $ns_Nmacros
     595#           sprintf macroName "ns%dMacro" $i
     596#           book getword nsStacks $options:0 $macroName -var macroCmd
     597#           $macroCmd
     598#       end
     599#     end
     600
     601#     if ($VERBOSE > 2)
     602#       book listbook nsData
     603#     end
     604#   end
     605
     606#   # locked list
     607#   task.exit    default
     608#     showcommand failure
     609#   end
     610#   task.exit    crash
     611#     showcommand crash
     612#   end
     613#   #operation times out?
     614#   task.exit    timeout
     615#     showcommand timeout
     616#   end
     617# end
     618
     619
     620
     621
     622# #
     623# # Check to see if the warps are finished
     624# #
     625# task              ns.diffs.load
     626#   active          false
     627#   host            local
     628#   periods         -poll $LOADPOLL
     629#   periods         -exec $LOADEXEC
     630#   periods         -timeout 120
     631#   npending        1
     632
     633#   task.exec
     634#      stdout NULL
     635#      stderr $LOGDIR/ns.diffs.log
     636
     637#      book getpage nsData $ns_diffPAGE -var key
     638#      book getword nsDiffs $key date -var date
     639#      book getword nsDiffs $key nsDiffState -var ns_STATE
     640#      book getword nsStacks $key nsStackState -var ns_stack_STATE
     641#      book getword nsData $key dbname -var DBNAME
     642#      book npages nsData -var Npages
     643
     644#     if ($VERBOSE > 5)
     645#        echo "ns.diffs.load: " $ns_diffPAGE $key $date $DBNAME $ns_STATE $Npages
     646#     end
     647
     648#      $ns_diffPAGE ++
     649#      if ($ns_diffPAGE >= $Npages) set ns_diffPAGE = 0
     650#      option $key
     651
     652#      if ("$ns_STATE" != "TOWARP") break
     653#      $run = nightly_science.pl --check_diffs --date $date --dbname $DBNAME
     654# #     add_standard_args $run
     655#      command $run
     656#    end
     657
     658#   # success
     659#   task.exit   0
     660# #    convert 'stdout' to book format
     661#     book delpage nsDiffs $options:0
     662#     ipptool2book stdout nsDiffs -uniq -key date
     663
     664#     book getword nsDiffs $options:0 nsNmacros -var ns_Nmacros
     665#     if ("$ns_Nmacros" != "NULL")
     666#       for i 0 $ns_Nmacros
     667#           sprintf macroName "ns%dMacro" $i
     668#           book getword nsDiffs $options:0 $macroName -var macroCmd
     669#           $macroCmd
     670#       end
     671#     end
     672
     673#     if ($VERBOSE > 2)
     674#       book listbook nsData
     675#     end
     676#   end
     677
     678#   # locked list
     679#   task.exit    default
     680#     showcommand failure
     681#   end
     682#   task.exit    crash
     683#     showcommand crash
     684#   end
     685#   #operation times out?
     686#   task.exit    timeout
     687#     showcommand timeout
     688#   end
     689# end
     690
     691
     692# # END GRAVEYARD
     693# end
     694
     695
    637696# #
    638697# # Queue sweetspot runs
Note: See TracChangeset for help on using the changeset viewer.