IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24596 for trunk/ippTasks


Ignore:
Timestamp:
Jun 25, 2009, 4:33:53 PM (17 years ago)
Author:
eugene
Message:

adding chip, camera, fake, warp revert tasks

Location:
trunk/ippTasks
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/camera.pro

    r24595 r24596  
    77
    88book init camPendingExp
    9 #book init camPendingCleanup
    109
    1110macro camera.status
    1211  book listbook camPendingExp
    13 #  book listbook camPendingCleanup
    1412end
    1513
    1614macro camera.reset
    1715  book init camPendingExp
    18 #  book init camPendingCleanup
    1916end
    2017
     
    3734end
    3835
    39 # macro camera.cleanup.on
    40 #   task camera.cleanup.load
    41 #     active true
    42 #   end
    43 #   task camera.cleanup.run
    44 #     active true
    45 #   end
    46 # end
    47 
    48 # macro camera.cleanup.off
    49 #   task camera.cleanup.load
    50 #     active false
    51 #   end
    52 #   task camera.cleanup.run
    53 #     active false
    54 #   end
    55 # end
    56 
    5736# this variable will cycle through the known database names
    5837$camera_DB = 0
     38$camera_revert_DB = 0
    5939
    6040# select images ready for camera analysis
     
    199179end
    200180
    201 # # this variable will cycle through the known database names
    202 # $camera_cleanup_DB = 0
    203 
    204 # # select images ready for cam analysis
    205 # # new entries are added to camPendingImfile
    206 # # skip already-present entries
    207 # task         camera.cleanup.load
    208 #   host         local
    209 
    210 #   periods      -poll $LOADPOLL
    211 #   periods      -exec $LOADEXEC
    212 #   periods      -timeout 30
    213 #   npending     1
    214 #   active       false
    215 
    216 #   stdout NULL
    217 #   stderr $LOGDIR/camera.cleanup.log
    218 
    219 #   task.exec
    220 #     if ($LABEL:n == 0) break
    221 #     $run = camtool -pendingcleanuprun
    222 #     if ($DB:n == 0)
    223 #       option DEFAULT
    224 #     else
    225 #       # save the DB name for the exit tasks
    226 #       option $DB:$camera_cleanup_DB
    227 #       $run = $run -dbname $DB:$camera_cleanup_DB
    228 #       $camera_cleanup_DB ++
    229 #       if ($camera_cleanup_DB >= $DB:n) set camera_cleanup_DB = 0
    230 #     end
    231 #     add_poll_args run
    232 #     add_poll_labels run
    233 #     command $run
    234 #   end
    235 
    236 #   # success
    237 #   task.exit    0
    238 #     # convert 'stdout' to book format
    239 #     ipptool2book stdout camPendingCleanup -key cam_id -uniq -setword dbname $options:0 -setword pantaskState INIT
    240 #     if ($VERBOSE > 2)
    241 #       book listbook camPendingCleanup
    242 #     end
    243 
    244 #     # delete existing entries in the appropriate pantaskStates
    245 #     process_cleanup camPendingCleanup
    246 #   end
    247 
    248 #   # locked list
    249 #   task.exit    default
    250 #     showcommand failure
    251 #   end
    252 
    253 #   task.exit    crash
    254 #     showcommand crash
    255 #   end
    256 
    257 #   # operation times out?
    258 #   task.exit    timeout
    259 #     showcommand timeout
    260 #   end
    261 # end
    262 
    263 # # run the ipp_cleanup.pl script on pending images
    264 # task         camera.cleanup.run
    265 #   periods      -poll $RUNPOLL
    266 #   periods      -exec $RUNEXEC
    267 #   periods      -timeout 60
    268 #   active       false
    269 
    270 #   task.exec
    271 #     book npages camPendingCleanup -var N
    272 #     if ($N == 0) break
    273 #     if ($NETWORK == 0) break
    274    
    275 #     # look for new images in camPendingCleanup (pantaskState == INIT)
    276 #     book getpage camPendingCleanup 0 -var pageName -key pantaskState INIT
    277 #     if ("$pageName" == "NULL") break
    278 
    279 #     book setword camPendingCleanup $pageName pantaskState RUN
    280 #     book getword camPendingCleanup $pageName camera -var CAMERA
    281 #     book getword camPendingCleanup $pageName state  -var CLEANUP_MODE
    282 #     book getword camPendingCleanup $pageName cam_id -var CAM_ID
    283 #     book getword camPendingCleanup $pageName dbname -var DBNAME
    284 
    285 #     # specify choice of local or remote host based on camera and cam (class_id)
    286 #     set.host.for.camera $CAMERA FPA
    287 
    288 #     stdout $LOGDIR/camera.cleanup.log
    289 #     stderr $LOGDIR/camera.cleanup.log
    290 
    291 #     # XXX is everything listed here needed?
    292 #     $run = ipp_cleanup.pl --stage camera --stage_id $CAM_ID --camera $CAMERA --mode $CLEANUP_MODE
    293 #     add_standard_args run
    294 
    295 #     # save the pageName for future reference below
    296 #     options $pageName
    297 
    298 #     # create the command line
    299 #     if ($VERBOSE > 1)
    300 #       echo command $run
    301 #     end
    302 #     command $run
    303 #   end
    304 
    305 #   # default exit status
    306 #   task.exit    default
    307 #     process_exit camPendingCleanup $options:0 $JOB_STATUS
    308 #   end
    309 
    310 #   task.exit    crash
    311 #     showcommand crash
    312 #     book setword camPendingCleanup $options:0 pantaskState CRASH
    313 #   end
    314 
    315 #   # operation timed out?
    316 #   task.exit    timeout
    317 #     showcommand timeout
    318 #     book setword camPendingCleanup $options:0 pantaskState TIMEOUT
    319 #   end
    320 # end
     181task camera.revert
     182  host         local
     183
     184  periods      -poll 5.0
     185  periods      -exec 60.0
     186  periods      -timeout 120.0
     187  npending     1
     188
     189  stdout NULL
     190  stderr $LOGDIR/revert.log
     191
     192  task.exec
     193    if ($LABEL:n == 0) break
     194    $run = camtool -revertprocessedexp
     195    if ($DB:n == 0)
     196      option DEFAULT
     197    else
     198      # save the DB name for the exit tasks
     199      option $DB:$camera_revert_DB
     200      $run = $run -dbname $DB:$camera_revert_DB
     201      $camera_revert_DB ++
     202      if ($camera_revert_DB >= $DB:n) set camera_revert_DB = 0
     203    end
     204    add_poll_labels run
     205    command $run
     206  end
     207
     208  # success
     209  task.exit    0
     210  end
     211
     212  # locked list
     213  task.exit    default
     214    showcommand failure
     215  end
     216
     217  task.exit    crash
     218    showcommand crash
     219  end
     220
     221  # operation times out?
     222  task.exit    timeout
     223    showcommand timeout
     224  end
     225end
  • trunk/ippTasks/chip.pro

    r24595 r24596  
    33## these tasks use the book chipPendingImfile
    44
    5 ## XXX the cleanup stage probably needs to mimic the chip processing stages, with an exposure and imfile layer
    6 ## can we define the cleanup stages in a separate file derived from this file?
    7 
    85# test for required global variables
    96check.globals
    107
    118book init chipPendingImfile
    12 #book init chipPendingCleanup
    139
    1410macro chip.status
    1511  book listbook chipPendingImfile
    16 #  book listbook chipPendingCleanup
    1712end
    1813
    1914macro chip.reset
    2015  book init chipPendingImfile
    21 #  book init chipPendingCleanup
    2216end
    2317
     
    4640end
    4741
    48 # macro chip.cleanup.on
    49 #   task chip.cleanup.load
    50 #     active true
    51 #   end
    52 #   task chip.cleanup.run
    53 #     active true
    54 #   end
    55 # end
    56 
    57 # macro chip.cleanup.off
    58 #   task chip.cleanup.load
    59 #     active false
    60 #   end
    61 #   task chip.cleanup.run
    62 #     active false
    63 #   end
    64 # end
    65 
    6642# this variable will cycle through the known database names
    6743$chip_DB = 0
     44$chip_revert_DB = 0
    6845
    6946# select images ready for chip analysis
     
    273250end
    274251
    275 # # this variable will cycle through the known database names
    276 # $chip_cleanup_DB = 0
    277 
    278 # # select images ready for chip analysis
    279 # # new entries are added to chipPendingImfile
    280 # # skip already-present entries
    281 # task         chip.cleanup.load
    282 #   host         local
    283 
    284 #   periods      -poll $LOADPOLL
    285 #   periods      -exec $LOADEXEC
    286 #   periods      -timeout 30
    287 #   npending     1
    288 #   active       false
    289 
    290 #   stdout NULL
    291 #   stderr $LOGDIR/chip.cleanup.log
    292 
    293 #   task.exec
    294 #     if ($LABEL:n == 0) break
    295 #     $run = chiptool -pendingcleanuprun
    296 #     if ($DB:n == 0)
    297 #       option DEFAULT
    298 #     else
    299 #       # save the DB name for the exit tasks
    300 #       option $DB:$chip_cleanup_DB
    301 #       $run = $run -dbname $DB:$chip_cleanup_DB
    302 #       $chip_cleanup_DB ++
    303 #       if ($chip_cleanup_DB >= $DB:n) set chip_cleanup_DB = 0
    304 #     end
    305 #     add_poll_args run
    306 #     add_poll_labels run
    307 #     command $run
    308 #   end
    309 
    310 #   # success
    311 #   task.exit    0
    312 #     # convert 'stdout' to book format
    313 #     ipptool2book stdout chipPendingCleanup -key chip_id -uniq -setword dbname $options:0 -setword pantaskState INIT
    314 #     if ($VERBOSE > 2)
    315 #       book listbook chipPendingCleanup
    316 #     end
    317 
    318 #     # delete existing entries in the appropriate pantaskStates
    319 #     process_cleanup chipPendingCleanup
    320 #   end
    321 
    322 #   # locked list
    323 #   task.exit    default
    324 #     showcommand failure
    325 #   end
    326 
    327 #   task.exit    crash
    328 #     showcommand crash
    329 #   end
    330 
    331 #   # operation times out?
    332 #   task.exit    timeout
    333 #     showcommand timeout
    334 #   end
    335 # end
    336 
    337 # # run the ipp_cleanup.pl script on pending images
    338 # task         chip.cleanup.run
    339 #   periods      -poll $RUNPOLL
    340 #   periods      -exec $RUNEXEC
    341 #   periods      -timeout 60
    342 #   active       false
    343 
    344 #   task.exec
    345 #     book npages chipPendingCleanup -var N
    346 #     if ($N == 0) break
    347 #     if ($NETWORK == 0) break
    348    
    349 #     # look for new images in chipPendingCleanup (pantaskState == INIT)
    350 #     book getpage chipPendingCleanup 0 -var pageName -key pantaskState INIT
    351 #     if ("$pageName" == "NULL") break
    352 
    353 #     book setword chipPendingCleanup $pageName pantaskState RUN
    354 #     book getword chipPendingCleanup $pageName camera -var CAMERA
    355 #     book getword chipPendingCleanup $pageName state -var CLEANUP_MODE
    356 #     book getword chipPendingCleanup $pageName chip_id -var CHIP_ID
    357 #     book getword chipPendingCleanup $pageName dbname -var DBNAME
    358 
    359 #     # specify choice of local or remote host based on camera and chip (class_id)
    360 #     set.host.for.camera $CAMERA FPA
    361 
    362 #     stdout $LOGDIR/chip.cleanup.log
    363 #     stderr $LOGDIR/chip.cleanup.log
    364 
    365 #     # XXX is everything listed here needed?
    366 #     $run = ipp_cleanup.pl --stage chip --stage_id $CHIP_ID --camera $CAMERA --mode $CLEANUP_MODE
    367 #     add_standard_args run
    368 
    369 #     # save the pageName for future reference below
    370 #     options $pageName
    371 
    372 #     # create the command line
    373 #     if ($VERBOSE > 1)
    374 #       echo command $run
    375 #     end
    376 #     command $run
    377 #   end
    378 
    379 #   # default exit status
    380 #   task.exit    default
    381 #     process_exit chipPendingCleanup $options:0 $JOB_STATUS
    382 #   end
    383 
    384 #   task.exit    crash
    385 #     showcommand crash
    386 #     book setword chipPendingCleanup $options:0 pantaskState CRASH
    387 #   end
    388 
    389 #   # operation timed out?
    390 #   task.exit    timeout
    391 #     showcommand timeout
    392 #     book setword chipPendingCleanup $options:0 pantaskState TIMEOUT
    393 #   end
    394 # end
     252task chip.revert
     253  host         local
     254
     255  periods      -poll 5.0
     256  periods      -exec 60.0
     257  periods      -timeout 120.0
     258  npending     1
     259
     260  stdout NULL
     261  stderr $LOGDIR/revert.log
     262
     263  task.exec
     264    if ($LABEL:n == 0) break
     265    $run = chiptool -revertprocessedimfile
     266    if ($DB:n == 0)
     267      option DEFAULT
     268    else
     269      # save the DB name for the exit tasks
     270      option $DB:$chip_revert_DB
     271      $run = $run -dbname $DB:$chip_revert_DB
     272      $chip_revert_DB ++
     273      if ($chip_revert_DB >= $DB:n) set chip_revert_DB = 0
     274    end
     275    add_poll_labels run
     276    command $run
     277  end
     278
     279  # success
     280  task.exit    0
     281  end
     282
     283  # locked list
     284  task.exit    default
     285    showcommand failure
     286  end
     287
     288  task.exit    crash
     289    showcommand crash
     290  end
     291
     292  # operation times out?
     293  task.exit    timeout
     294    showcommand timeout
     295  end
     296end
  • trunk/ippTasks/fake.pro

    r24595 r24596  
    77
    88book init fakePendingImfile
    9 #book init fakePendingCleanup
    109
    1110macro fake.status
    1211  book listbook fakePendingImfile
    13 #  book listbook fakePendingCleanup
    1412end
    1513
    1614macro fake.reset
    1715  book init fakePendingImfile
    18 #  book init fakePendingCleanup
    1916end
    2017
     
    4340end
    4441
    45 # macro fake.cleanup.on
    46 #   task fake.cleanup.load
    47 #     active true
    48 #   end
    49 #   task fake.cleanup.run
    50 #     active true
    51 #   end
    52 # end
    53 
    54 # macro fake.cleanup.off
    55 #   task fake.cleanup.load
    56 #     active false
    57 #   end
    58 #   task fake.cleanup.run
    59 #     active false
    60 #   end
    61 # end
    62 
    6342# this variable will cycle through the known database names
    6443$fakeImfile_DB = 0
     44$fake_revert_DB = 0
    6545
    6646# select images ready for fake analysis
     
    249229end
    250230
    251 # # this variable will cycle through the known database names
    252 # $fake_cleanup_DB = 0
    253 
    254 # # select images ready for fake analysis
    255 # # new entries are added to fakePendingImfile
    256 # # skip already-present entries
    257 # task         fake.cleanup.load
    258 #   host         local
    259 
    260 #   periods      -poll $LOADPOLL
    261 #   periods      -exec $LOADEXEC
    262 #   periods      -timeout 30
    263 #   npending     1
    264 #   active       false
    265 
    266 #   stdout NULL
    267 #   stderr $LOGDIR/fake.cleanup.log
    268 
    269 #   task.exec
    270 #     if ($LABEL:n == 0) break
    271 #     $run = faketool -pendingcleanuprun
    272 #     if ($DB:n == 0)
    273 #       option DEFAULT
    274 #       command
    275 #     else
    276 #       # save the DB name for the exit tasks
    277 #       option $DB:$fake_cleanup_DB
    278 #       $run = $run -dbname $DB:$fake_cleanup_DB
    279 #       $fake_cleanup_DB ++
    280 #       if ($fake_cleanup_DB >= $DB:n) set fake_cleanup_DB = 0
    281 #     end
    282 #     add_poll_args run
    283 #     add_poll_labels run
    284 #     command $run
    285 #   end
    286 
    287 #   # success
    288 #   task.exit    0
    289 #     # convert 'stdout' to book format
    290 #     ipptool2book stdout fakePendingCleanup -key fake_id -uniq -setword dbname $options:0 -setword pantaskState INIT
    291 #     if ($VERBOSE > 2)
    292 #       book listbook fakePendingCleanup
    293 #     end
    294 
    295 #     # delete existing entries in the appropriate pantaskStates
    296 #     process_cleanup fakePendingCleanup
    297 #   end
    298 
    299 #   # locked list
    300 #   task.exit    default
    301 #     showcommand failure
    302 #   end
    303 
    304 #   task.exit    crash
    305 #     showcommand crash
    306 #   end
    307 
    308 #   # operation times out?
    309 #   task.exit    timeout
    310 #     showcommand timeout
    311 #   end
    312 # end
    313 
    314 # # run the ipp_cleanup.pl script on pending images
    315 # task         fake.cleanup.run
    316 #   periods      -poll $RUNPOLL
    317 #   periods      -exec $RUNEXEC
    318 #   periods      -timeout 60
    319 #   active       false
    320 
    321 #   task.exec
    322 #     book npages fakePendingCleanup -var N
    323 #     if ($N == 0) break
    324 #     if ($NETWORK == 0) break
    325    
    326 #     # look for new images in fakePendingCleanup (pantaskState == INIT)
    327 #     book getpage fakePendingCleanup 0 -var pageName -key pantaskState INIT
    328 #     if ("$pageName" == "NULL") break
    329 
    330 #     book setword fakePendingCleanup $pageName pantaskState RUN
    331 #     book getword fakePendingCleanup $pageName camera -var CAMERA
    332 #     book getword fakePendingCleanup $pageName state -var CLEANUP_MODE
    333 #     book getword fakePendingCleanup $pageName fake_id -var FAKE_ID
    334 #     book getword fakePendingCleanup $pageName dbname -var DBNAME
    335 
    336 #     # specify choice of local or remote host based on camera and fake (class_id)
    337 #     set.host.for.camera $CAMERA FPA
    338 
    339 #     stdout $LOGDIR/fake.cleanup.log
    340 #     stderr $LOGDIR/fake.cleanup.log
    341 
    342 #     # XXX is everything listed here needed?
    343 #     $run = ipp_cleanup.pl --stage fake --stage_id $FAKE_ID --camera $CAMERA --mode $CLEANUP_MODE
    344 #     add_standard_args run
    345 
    346 #     # save the pageName for future reference below
    347 #     options $pageName
    348 
    349 #     # create the command line
    350 #     if ($VERBOSE > 1)
    351 #       echo command $run
    352 #     end
    353 #     command $run
    354 #   end
    355 
    356 #   # default exit status
    357 #   task.exit    default
    358 #     process_exit fakePendingCleanup $options:0 $JOB_STATUS
    359 #   end
    360 
    361 #   task.exit    crash
    362 #     showcommand crash
    363 #     book setword fakePendingCleanup $options:0 pantaskState CRASH
    364 #   end
    365 
    366 #   # operation timed out?
    367 #   task.exit    timeout
    368 #     showcommand timeout
    369 #     book setword fakePendingCleanup $options:0 pantaskState TIMEOUT
    370 #   end
    371 # end
     231task fake.revert
     232  host         local
     233
     234  periods      -poll 5.0
     235  periods      -exec 60.0
     236  periods      -timeout 120.0
     237  npending     1
     238
     239  stdout NULL
     240  stderr $LOGDIR/revert.log
     241
     242  task.exec
     243    if ($LABEL:n == 0) break
     244    $run = faketool -revertprocessedimfile
     245    if ($DB:n == 0)
     246      option DEFAULT
     247    else
     248      # save the DB name for the exit tasks
     249      option $DB:$fake_revert_DB
     250      $run = $run -dbname $DB:$fake_revert_DB
     251      $fake_revert_DB ++
     252      if ($fake_revert_DB >= $DB:n) set fake_revert_DB = 0
     253    end
     254    add_poll_labels run
     255    command $run
     256  end
     257
     258  # success
     259  task.exit    0
     260  end
     261
     262  # locked list
     263  task.exit    default
     264    showcommand failure
     265  end
     266
     267  task.exit    crash
     268    showcommand crash
     269  end
     270
     271  # operation times out?
     272  task.exit    timeout
     273    showcommand timeout
     274  end
     275end
  • trunk/ippTasks/warp.pro

    r24595 r24596  
    1717$warpExp_DB = 0
    1818$warpSkycell_DB = 0
    19 #$warpCleanup_DB = 0
     19$warp_revert_overlap_DB = 0
     20$warp_revert_warped_DB = 0
    2021
    2122### Check status of warping tasks
     
    2324  book listbook warpInputExp
    2425  book listbook warpPendingSkyCell
    25 #  book listbook warpPendingCleanup
    2626end
    2727
     
    3030  book init warpInputExp
    3131  book init warpPendingSkyCell
    32 #  book init warpPendingCleanup
    3332end
    3433
     
    7069  end
    7170end
    72 
    73 # macro warp.cleanup.on
    74 #   task warp.cleanup.load
    75 #     active true
    76 #   end
    77 #   task warp.cleanup.run
    78 #     active true
    79 #   end
    80 # end
    81 # macro warp.cleanup.off
    82 #   task warp.cleanup.load
    83 #     active false
    84 #   end
    85 #   task warp.cleanup.run
    86 #     active false
    87 #   end
    88 # end
    8971
    9072### Load tasks for calculating the warp overlaps
     
    404386end
    405387
    406 # # select images ready for warp analysis
    407 # # new entries are added to warpPendingImfile
    408 # # skip already-present entries
    409 # task         warp.cleanup.load
    410 #   host         local
    411 
    412 #   periods      -poll $LOADPOLL
    413 #   periods      -exec $LOADEXEC
    414 #   periods      -timeout 30
    415 #   npending     1
    416 #   active       false
    417 
    418 #   stdout NULL
    419 #   stderr $LOGDIR/warp.cleanup.log
    420 
    421 #   task.exec
    422 #     if ($LABEL:n == 0) break
    423 #     $run = warptool -pendingcleanuprun
    424 #     if ($DB:n == 0)
    425 #       option DEFAULT
    426 #     else
    427 #       # save the DB name for the exit tasks
    428 #       option $DB:$warpCleanup_DB
    429 #       $run = $run -dbname $DB:$warpCleanup_DB
    430 #       $warpCleanup_DB ++
    431 #       if ($warpCleanup_DB >= $DB:n) set warpCleanup_DB = 0
    432 #     end
    433 #     add_poll_args run
    434 #     add_poll_labels run
    435 #     command $run
    436 #   end
    437 
    438 #   # success
    439 #   task.exit    0
    440 #     # convert 'stdout' to book format
    441 #     ipptool2book stdout warpPendingCleanup -key warp_id -uniq -setword dbname $options:0 -setword pantaskState INIT
    442 #     if ($VERBOSE > 2)
    443 #       book listbook warpPendingCleanup
    444 #     end
    445 
    446 #     # delete existing entries in the appropriate pantaskStates
    447 #     process_cleanup warpPendingCleanup
    448 #   end
    449 
    450 #   # locked list
    451 #   task.exit    default
    452 #     showcommand failure
    453 #   end
    454 
    455 #   task.exit    crash
    456 #     showcommand crash
    457 #   end
    458 
    459 #   # operation times out?
    460 #   task.exit    timeout
    461 #     showcommand timeout
    462 #   end
    463 # end
    464 
    465 # # run the ipp_cleanup.pl script on pending images
    466 # task         warp.cleanup.run
    467 #   periods      -poll $RUNPOLL
    468 #   periods      -exec $RUNEXEC
    469 #   periods      -timeout 60
    470 #   active       false
    471 
    472 #   task.exec
    473 #     book npages warpPendingCleanup -var N
    474 #     if ($N == 0) break
    475 #     if ($NETWORK == 0) break
    476    
    477 #     # look for new images in warpPendingCleanup (pantaskState == INIT)
    478 #     book getpage warpPendingCleanup 0 -var pageName -key pantaskState INIT
    479 #     if ("$pageName" == "NULL") break
    480 
    481 #     book setword warpPendingCleanup $pageName pantaskState RUN
    482 #     book getword warpPendingCleanup $pageName camera -var CAMERA
    483 #     book getword warpPendingCleanup $pageName state -var CLEANUP_MODE
    484 #     book getword warpPendingCleanup $pageName warp_id -var WARP_ID
    485 #     book getword warpPendingCleanup $pageName dbname -var DBNAME
    486 
    487 #     # specify choice of local or remote host based on camera and warp (class_id)
    488 #     set.host.for.camera $CAMERA FPA
    489 
    490 #     stdout $LOGDIR/warp.cleanup.log
    491 #     stderr $LOGDIR/warp.cleanup.log
    492 
    493 #     # XXX is everything listed here needed?
    494 #     $run = ipp_cleanup.pl --stage warp --stage_id $WARP_ID --camera $CAMERA --mode $CLEANUP_MODE
    495 #     add_standard_args run
    496 
    497 #     # save the pageName for future reference below
    498 #     options $pageName
    499 
    500 #     # create the command line
    501 #     if ($VERBOSE > 1)
    502 #       echo command $run
    503 #     end
    504 #     command $run
    505 #   end
    506 
    507 #   # default exit status
    508 #   task.exit    default
    509 #     process_exit warpPendingCleanup $options:0 $JOB_STATUS
    510 #   end
    511 
    512 #   task.exit    crash
    513 #     showcommand crash
    514 #     book setword warpPendingCleanup $options:0 pantaskState CRASH
    515 #   end
    516 
    517 #   # operation timed out?
    518 #   task.exit    timeout
    519 #     showcommand timeout
    520 #     book setword warpPendingCleanup $options:0 pantaskState TIMEOUT
    521 #   end
    522 # end
     388task warp.revert.overlap
     389  host         local
     390
     391  periods      -poll 5.0
     392  periods      -exec 60.0
     393  periods      -timeout 120.0
     394  npending     1
     395
     396  stdout NULL
     397  stderr $LOGDIR/revert.log
     398
     399  task.exec
     400    if ($LABEL:n == 0) break
     401    $run = warptool -revertoverlap
     402    if ($DB:n == 0)
     403      option DEFAULT
     404    else
     405      # save the DB name for the exit tasks
     406      option $DB:$warp_revert_overlap_DB
     407      $run = $run -dbname $DB:$warp_revert_overlap_DB
     408      $warp_revert_overlap_DB ++
     409      if ($warp_revert_overlap_DB >= $DB:n) set warp_revert_overlap_DB = 0
     410    end
     411    add_poll_labels run
     412    command $run
     413  end
     414
     415  # success
     416  task.exit    0
     417  end
     418
     419  # locked list
     420  task.exit    default
     421    showcommand failure
     422  end
     423
     424  task.exit    crash
     425    showcommand crash
     426  end
     427
     428  # operation times out?
     429  task.exit    timeout
     430    showcommand timeout
     431  end
     432end
     433
     434task warp.revert.warped
     435  host         local
     436
     437  periods      -poll 5.0
     438  periods      -exec 60.0
     439  periods      -timeout 120.0
     440  npending     1
     441
     442  stdout NULL
     443  stderr $LOGDIR/revert.log
     444
     445  task.exec
     446    if ($LABEL:n == 0) break
     447    $run = warptool -revertwarped
     448    if ($DB:n == 0)
     449      option DEFAULT
     450    else
     451      # save the DB name for the exit tasks
     452      option $DB:$warp_revert_warped_DB
     453      $run = $run -dbname $DB:$warp_revert_warped_DB
     454      $warp_revert_warped_DB ++
     455      if ($warp_revert_warped_DB >= $DB:n) set warp_revert_warped_DB = 0
     456    end
     457    add_poll_labels run
     458    command $run
     459  end
     460
     461  # success
     462  task.exit    0
     463  end
     464
     465  # locked list
     466  task.exit    default
     467    showcommand failure
     468  end
     469
     470  task.exit    crash
     471    showcommand crash
     472  end
     473
     474  # operation times out?
     475  task.exit    timeout
     476    showcommand timeout
     477  end
     478end
Note: See TracChangeset for help on using the changeset viewer.