IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24595


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

Commented out clean up stages, and moved that code to science.cleanup.pro

Location:
trunk/ippTasks
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/camera.pro

    r24098 r24595  
    77
    88book init camPendingExp
    9 book init camPendingCleanup
     9#book init camPendingCleanup
    1010
    1111macro camera.status
    1212  book listbook camPendingExp
    13   book listbook camPendingCleanup
     13#  book listbook camPendingCleanup
    1414end
    1515
    1616macro camera.reset
    1717  book init camPendingExp
    18   book init camPendingCleanup
     18#  book init camPendingCleanup
    1919end
    2020
     
    3737end
    3838
    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
     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
    5656
    5757# this variable will cycle through the known database names
     
    199199end
    200200
    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
     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
    274274   
    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
     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
  • trunk/ippTasks/chip.pro

    r24098 r24595  
    1010
    1111book init chipPendingImfile
    12 book init chipPendingCleanup
     12#book init chipPendingCleanup
    1313
    1414macro chip.status
    1515  book listbook chipPendingImfile
    16   book listbook chipPendingCleanup
     16#  book listbook chipPendingCleanup
    1717end
    1818
    1919macro chip.reset
    2020  book init chipPendingImfile
    21   book init chipPendingCleanup
     21#  book init chipPendingCleanup
    2222end
    2323
     
    4646end
    4747
    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
     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
    6565
    6666# this variable will cycle through the known database names
     
    273273end
    274274
    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
     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
    348348   
    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
     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
  • trunk/ippTasks/diff.pro

    r24183 r24595  
    1010### Initialise the books containing the tasks to do
    1111book init diffSkyfile
    12 book init diffCleanup
     12#book init diffCleanup
    1313
    1414### Database lists
    1515$diffSkycell_DB = 0
    16 $diffCleanup_DB = 0
     16#$diffCleanup_DB = 0
    1717
    1818### Check status of diffing tasks
    1919macro diff.status
    2020  book listbook diffSkyfile
    21   book listbook diffCleanup
     21#  book listbook diffCleanup
    2222end
    2323
     
    2525macro diff.reset
    2626  book init diffSkyfile
    27   book init diffCleanup
     27#  book init diffCleanup
    2828end
    2929
     
    4848end
    4949
    50 macro diff.cleanup.on
    51   task diff.cleanup.load
    52     active true
    53   end
    54   task diff.cleanup.run
    55     active true
    56   end
    57 end
    58 
    59 macro diff.cleanup.off
    60   task diff.cleanup.load
    61     active false
    62   end
    63   task diff.cleanup.run
    64     active false
    65   end
    66 end
     50# macro diff.cleanup.on
     51#   task diff.cleanup.load
     52#     active true
     53#   end
     54#   task diff.cleanup.run
     55#     active true
     56#   end
     57# end
     58
     59# macro diff.cleanup.off
     60#   task diff.cleanup.load
     61#     active false
     62#   end
     63#   task diff.cleanup.run
     64#     active false
     65#   end
     66# end
    6767
    6868
     
    199199end
    200200
    201 # select images ready for diff analysis
    202 # new entries are added to diffPendingImfile
    203 # skip already-present entries
    204 task           diff.cleanup.load
    205   host         local
    206 
    207   periods      -poll $LOADPOLL
    208   periods      -exec $LOADEXEC
    209   periods      -timeout 30
    210   npending     1
    211   active       false
    212 
    213   stdout NULL
    214   stderr $LOGDIR/diff.cleanup.log
    215 
    216   task.exec
    217     if ($LABEL:n == 0) break
    218     $run = difftool -pendingcleanuprun
    219     if ($DB:n == 0)
    220       option DEFAULT
    221     else
    222       # save the DB name for the exit tasks
    223       option $DB:$diffCleanup_DB
    224       $run = $run -dbname $DB:$diffCleanup_DB
    225       $diffCleanup_DB ++
    226       if ($diffCleanup_DB >= $DB:n) set diffCleanup_DB = 0
    227     end
    228     add_poll_args run
    229     add_poll_labels run
    230     command $run
    231   end
    232 
    233   # success
    234   task.exit    0
    235     # convert 'stdout' to book format
    236     ipptool2book stdout diffCleanup -key diff_id -uniq -setword dbname $options:0 -setword pantaskState INIT
    237     if ($VERBOSE > 2)
    238       book listbook diffCleanup
    239     end
    240 
    241     # delete existing entries in the appropriate pantaskStates
    242     process_cleanup diffCleanup
    243   end
    244 
    245   # locked list
    246   task.exit    default
    247     showcommand failure
    248   end
    249 
    250   task.exit    crash
    251     showcommand crash
    252   end
    253 
    254   # operation times out?
    255   task.exit    timeout
    256     showcommand timeout
    257   end
    258 end
    259 
    260 # run the ipp_cleanup.pl script on pending images
    261 task           diff.cleanup.run
    262   periods      -poll $RUNPOLL
    263   periods      -exec $RUNEXEC
    264   periods      -timeout 60
    265   active       false
    266 
    267   task.exec
    268     book npages diffCleanup -var N
    269     if ($N == 0) break
    270     if ($NETWORK == 0) break
     201# # select images ready for diff analysis
     202# # new entries are added to diffPendingImfile
     203# # skip already-present entries
     204# task         diff.cleanup.load
     205#   host         local
     206
     207#   periods      -poll $LOADPOLL
     208#   periods      -exec $LOADEXEC
     209#   periods      -timeout 30
     210#   npending     1
     211#   active       false
     212
     213#   stdout NULL
     214#   stderr $LOGDIR/diff.cleanup.log
     215
     216#   task.exec
     217#     if ($LABEL:n == 0) break
     218#     $run = difftool -pendingcleanuprun
     219#     if ($DB:n == 0)
     220#       option DEFAULT
     221#     else
     222#       # save the DB name for the exit tasks
     223#       option $DB:$diffCleanup_DB
     224#       $run = $run -dbname $DB:$diffCleanup_DB
     225#       $diffCleanup_DB ++
     226#       if ($diffCleanup_DB >= $DB:n) set diffCleanup_DB = 0
     227#     end
     228#     add_poll_args run
     229#     add_poll_labels run
     230#     command $run
     231#   end
     232
     233#   # success
     234#   task.exit    0
     235#     # convert 'stdout' to book format
     236#     ipptool2book stdout diffCleanup -key diff_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     237#     if ($VERBOSE > 2)
     238#       book listbook diffCleanup
     239#     end
     240
     241#     # delete existing entries in the appropriate pantaskStates
     242#     process_cleanup diffCleanup
     243#   end
     244
     245#   # locked list
     246#   task.exit    default
     247#     showcommand failure
     248#   end
     249
     250#   task.exit    crash
     251#     showcommand crash
     252#   end
     253
     254#   # operation times out?
     255#   task.exit    timeout
     256#     showcommand timeout
     257#   end
     258# end
     259
     260# # run the ipp_cleanup.pl script on pending images
     261# task         diff.cleanup.run
     262#   periods      -poll $RUNPOLL
     263#   periods      -exec $RUNEXEC
     264#   periods      -timeout 60
     265#   active       false
     266
     267#   task.exec
     268#     book npages diffCleanup -var N
     269#     if ($N == 0) break
     270#     if ($NETWORK == 0) break
    271271   
    272     # look for new images in diffCleanup (pantaskState == INIT)
    273     book getpage diffCleanup 0 -var pageName -key pantaskState INIT
    274     if ("$pageName" == "NULL") break
    275 
    276     book setword diffCleanup $pageName pantaskState RUN
    277     book getword diffCleanup $pageName camera -var CAMERA
    278     book getword diffCleanup $pageName state -var CLEANUP_MODE
    279     book getword diffCleanup $pageName diff_id -var DIFF_ID
    280     book getword diffCleanup $pageName dbname -var DBNAME
    281 
    282     # specify choice of local or remote host based on camera and diff (class_id)
    283     set.host.for.camera $CAMERA FPA
    284 
    285     stdout $LOGDIR/diff.cleanup.log
    286     stderr $LOGDIR/diff.cleanup.log
    287 
    288     # XXX is everything listed here needed?
    289     $run = ipp_cleanup.pl --stage diff --stage_id $DIFF_ID --camera $CAMERA --mode $CLEANUP_MODE
    290     add_standard_args run
    291 
    292     # save the pageName for future reference below
    293     options $pageName
    294 
    295     # create the command line
    296     if ($VERBOSE > 1)
    297       echo command $run
    298     end
    299     command $run
    300   end
    301 
    302   # default exit status
    303   task.exit    default
    304     process_exit diffCleanup $options:0 $JOB_STATUS
    305   end
    306 
    307   task.exit    crash
    308     showcommand crash
    309     book setword diffCleanup $options:0 pantaskState CRASH
    310   end
    311 
    312   # operation timed out?
    313   task.exit    timeout
    314     showcommand timeout
    315     book setword diffCleanup $options:0 pantaskState TIMEOUT
    316   end
    317 end
     272#     # look for new images in diffCleanup (pantaskState == INIT)
     273#     book getpage diffCleanup 0 -var pageName -key pantaskState INIT
     274#     if ("$pageName" == "NULL") break
     275
     276#     book setword diffCleanup $pageName pantaskState RUN
     277#     book getword diffCleanup $pageName camera -var CAMERA
     278#     book getword diffCleanup $pageName state -var CLEANUP_MODE
     279#     book getword diffCleanup $pageName diff_id -var DIFF_ID
     280#     book getword diffCleanup $pageName dbname -var DBNAME
     281
     282#     # specify choice of local or remote host based on camera and diff (class_id)
     283#     set.host.for.camera $CAMERA FPA
     284
     285#     stdout $LOGDIR/diff.cleanup.log
     286#     stderr $LOGDIR/diff.cleanup.log
     287
     288#     # XXX is everything listed here needed?
     289#     $run = ipp_cleanup.pl --stage diff --stage_id $DIFF_ID --camera $CAMERA --mode $CLEANUP_MODE
     290#     add_standard_args run
     291
     292#     # save the pageName for future reference below
     293#     options $pageName
     294
     295#     # create the command line
     296#     if ($VERBOSE > 1)
     297#       echo command $run
     298#     end
     299#     command $run
     300#   end
     301
     302#   # default exit status
     303#   task.exit    default
     304#     process_exit diffCleanup $options:0 $JOB_STATUS
     305#   end
     306
     307#   task.exit    crash
     308#     showcommand crash
     309#     book setword diffCleanup $options:0 pantaskState CRASH
     310#   end
     311
     312#   # operation timed out?
     313#   task.exit    timeout
     314#     showcommand timeout
     315#     book setword diffCleanup $options:0 pantaskState TIMEOUT
     316#   end
     317# end
  • trunk/ippTasks/fake.pro

    r24098 r24595  
    77
    88book init fakePendingImfile
    9 book init fakePendingCleanup
     9#book init fakePendingCleanup
    1010
    1111macro fake.status
    1212  book listbook fakePendingImfile
    13   book listbook fakePendingCleanup
     13#  book listbook fakePendingCleanup
    1414end
    1515
    1616macro fake.reset
    1717  book init fakePendingImfile
    18   book init fakePendingCleanup
     18#  book init fakePendingCleanup
    1919end
    2020
     
    4343end
    4444
    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
     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
    6262
    6363# this variable will cycle through the known database names
     
    249249end
    250250
    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
     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
    325325   
    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
     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
  • trunk/ippTasks/stack.pro

    r24098 r24595  
    1010### Initialise the books containing the tasks to do
    1111book init stackSumSkyfile
    12 book init stackCleanup
     12#book init stackCleanup
    1313
    1414### Database lists
    1515$stackSkycell_DB = 0
    16 $stackCleanup_DB = 0
     16#$stackCleanup_DB = 0
    1717
    1818### Check status of stacking tasks
    1919macro stack.status
    2020  book listbook stackSumSkyfile
    21   book listbook stackCleanup
     21#  book listbook stackCleanup
    2222end
    2323
     
    2525macro stack.reset
    2626  book init stackSumSkyfile
    27   book init stackCleanup
     27#  book init stackCleanup
    2828end
    2929
     
    4848end
    4949
    50 macro stack.cleanup.on
    51   task stack.cleanup.load
    52     active true
    53   end
    54   task stack.cleanup.run
    55     active true
    56   end
    57 end
    58 
    59 macro stack.cleanup.off
    60   task stack.cleanup.load
    61     active false
    62   end
    63   task stack.cleanup.run
    64     active false
    65   end
    66 end
     50# macro stack.cleanup.on
     51#   task stack.cleanup.load
     52#     active true
     53#   end
     54#   task stack.cleanup.run
     55#     active true
     56#   end
     57# end
     58
     59# macro stack.cleanup.off
     60#   task stack.cleanup.load
     61#     active false
     62#   end
     63#   task stack.cleanup.run
     64#     active false
     65#   end
     66# end
    6767
    6868
     
    195195
    196196
    197 # select images ready for stack analysis
    198 # new entries are added to stackCleanup
    199 # skip already-present entries
    200 task           stack.cleanup.load
    201   host         local
    202 
    203   periods      -poll $LOADPOLL
    204   periods      -exec $LOADEXEC
    205   periods      -timeout 30
    206   npending     1
    207   active       false
    208 
    209   stdout NULL
    210   stderr $LOGDIR/stack.cleanup.log
    211 
    212   task.exec
    213     if ($LABEL:n == 0) break
    214     $run = stacktool -pendingcleanuprun
    215     if ($DB:n == 0)
    216       option DEFAULT
    217     else
    218       # save the DB name for the exit tasks
    219       option $DB:$stackCleanup_DB
    220       $run = $run -dbname $DB:$stackCleanup_DB
    221       $stackCleanup_DB ++
    222       if ($stackCleanup_DB >= $DB:n) set stackCleanup_DB = 0
    223     end
    224     add_poll_args run
    225     add_poll_labels run
    226     command $run
    227   end
    228 
    229   # success
    230   task.exit    0
    231     # convert 'stdout' to book format
    232     ipptool2book stdout stackCleanup -key stack_id -uniq -setword dbname $options:0 -setword pantaskState INIT
    233     if ($VERBOSE > 2)
    234       book listbook stackCleanup
    235     end
    236 
    237     # delete existing entries in the appropriate pantaskStates
    238     process_cleanup stackCleanup
    239   end
    240 
    241   # locked list
    242   task.exit    default
    243     showcommand failure
    244   end
    245 
    246   task.exit    crash
    247     showcommand crash
    248   end
    249 
    250   # operation times out?
    251   task.exit    timeout
    252     showcommand timeout
    253   end
    254 end
    255 
    256 # run the ipp_cleanup.pl script on pending images
    257 task           stack.cleanup.run
    258   periods      -poll $RUNPOLL
    259   periods      -exec $RUNEXEC
    260   periods      -timeout 60
    261   active       false
    262 
    263   task.exec
    264     book npages stackCleanup -var N
    265     if ($N == 0) break
    266     if ($NETWORK == 0) break
     197# # select images ready for stack analysis
     198# # new entries are added to stackCleanup
     199# # skip already-present entries
     200# task         stack.cleanup.load
     201#   host         local
     202
     203#   periods      -poll $LOADPOLL
     204#   periods      -exec $LOADEXEC
     205#   periods      -timeout 30
     206#   npending     1
     207#   active       false
     208
     209#   stdout NULL
     210#   stderr $LOGDIR/stack.cleanup.log
     211
     212#   task.exec
     213#     if ($LABEL:n == 0) break
     214#     $run = stacktool -pendingcleanuprun
     215#     if ($DB:n == 0)
     216#       option DEFAULT
     217#     else
     218#       # save the DB name for the exit tasks
     219#       option $DB:$stackCleanup_DB
     220#       $run = $run -dbname $DB:$stackCleanup_DB
     221#       $stackCleanup_DB ++
     222#       if ($stackCleanup_DB >= $DB:n) set stackCleanup_DB = 0
     223#     end
     224#     add_poll_args run
     225#     add_poll_labels run
     226#     command $run
     227#   end
     228
     229#   # success
     230#   task.exit    0
     231#     # convert 'stdout' to book format
     232#     ipptool2book stdout stackCleanup -key stack_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     233#     if ($VERBOSE > 2)
     234#       book listbook stackCleanup
     235#     end
     236
     237#     # delete existing entries in the appropriate pantaskStates
     238#     process_cleanup stackCleanup
     239#   end
     240
     241#   # locked list
     242#   task.exit    default
     243#     showcommand failure
     244#   end
     245
     246#   task.exit    crash
     247#     showcommand crash
     248#   end
     249
     250#   # operation times out?
     251#   task.exit    timeout
     252#     showcommand timeout
     253#   end
     254# end
     255
     256# # run the ipp_cleanup.pl script on pending images
     257# task         stack.cleanup.run
     258#   periods      -poll $RUNPOLL
     259#   periods      -exec $RUNEXEC
     260#   periods      -timeout 60
     261#   active       false
     262
     263#   task.exec
     264#     book npages stackCleanup -var N
     265#     if ($N == 0) break
     266#     if ($NETWORK == 0) break
    267267   
    268     # look for new images in stackCleanup (pantaskState == INIT)
    269     book getpage stackCleanup 0 -var pageName -key pantaskState INIT
    270     if ("$pageName" == "NULL") break
    271 
    272     book setword stackCleanup $pageName pantaskState RUN
    273     book getword stackCleanup $pageName camera -var CAMERA
    274     book getword stackCleanup $pageName state -var CLEANUP_MODE
    275     book getword stackCleanup $pageName stack_id -var STACK_ID
    276     book getword stackCleanup $pageName dbname -var DBNAME
    277 
    278     # specify choice of local or remote host based on camera and stack (class_id)
    279     set.host.for.camera $CAMERA FPA
    280 
    281     stdout $LOGDIR/stack.cleanup.log
    282     stderr $LOGDIR/stack.cleanup.log
    283 
    284     # XXX is everything listed here needed?
    285     $run = ipp_cleanup.pl --stage stack --stage_id $STACK_ID --camera $CAMERA --mode $CLEANUP_MODE
    286     add_standard_args run
    287 
    288     # save the pageName for future reference below
    289     options $pageName
    290 
    291     # create the command line
    292     if ($VERBOSE > 1)
    293       echo command $run
    294     end
    295     command $run
    296   end
    297 
    298   # default exit status
    299   task.exit    default
    300     process_exit stackCleanup $options:0 $JOB_STATUS
    301   end
    302 
    303   task.exit    crash
    304     showcommand crash
    305     book setword stackCleanup $options:0 pantaskState CRASH
    306   end
    307 
    308   # operation timed out?
    309   task.exit    timeout
    310     showcommand timeout
    311     book setword stackCleanup $options:0 pantaskState TIMEOUT
    312   end
    313 end
     268#     # look for new images in stackCleanup (pantaskState == INIT)
     269#     book getpage stackCleanup 0 -var pageName -key pantaskState INIT
     270#     if ("$pageName" == "NULL") break
     271
     272#     book setword stackCleanup $pageName pantaskState RUN
     273#     book getword stackCleanup $pageName camera -var CAMERA
     274#     book getword stackCleanup $pageName state -var CLEANUP_MODE
     275#     book getword stackCleanup $pageName stack_id -var STACK_ID
     276#     book getword stackCleanup $pageName dbname -var DBNAME
     277
     278#     # specify choice of local or remote host based on camera and stack (class_id)
     279#     set.host.for.camera $CAMERA FPA
     280
     281#     stdout $LOGDIR/stack.cleanup.log
     282#     stderr $LOGDIR/stack.cleanup.log
     283
     284#     # XXX is everything listed here needed?
     285#     $run = ipp_cleanup.pl --stage stack --stage_id $STACK_ID --camera $CAMERA --mode $CLEANUP_MODE
     286#     add_standard_args run
     287
     288#     # save the pageName for future reference below
     289#     options $pageName
     290
     291#     # create the command line
     292#     if ($VERBOSE > 1)
     293#       echo command $run
     294#     end
     295#     command $run
     296#   end
     297
     298#   # default exit status
     299#   task.exit    default
     300#     process_exit stackCleanup $options:0 $JOB_STATUS
     301#   end
     302
     303#   task.exit    crash
     304#     showcommand crash
     305#     book setword stackCleanup $options:0 pantaskState CRASH
     306#   end
     307
     308#   # operation timed out?
     309#   task.exit    timeout
     310#     showcommand timeout
     311#     book setword stackCleanup $options:0 pantaskState TIMEOUT
     312#   end
     313# end
  • trunk/ippTasks/warp.pro

    r24506 r24595  
    1717$warpExp_DB = 0
    1818$warpSkycell_DB = 0
    19 $warpCleanup_DB = 0
     19#$warpCleanup_DB = 0
    2020
    2121### Check status of warping tasks
     
    2323  book listbook warpInputExp
    2424  book listbook warpPendingSkyCell
    25   book listbook warpPendingCleanup
     25#  book listbook warpPendingCleanup
    2626end
    2727
     
    3030  book init warpInputExp
    3131  book init warpPendingSkyCell
    32   book init warpPendingCleanup
     32#  book init warpPendingCleanup
    3333end
    3434
     
    7171end
    7272
    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
     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
    8989
    9090### Load tasks for calculating the warp overlaps
     
    404404end
    405405
    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
     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
    476476   
    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
     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
Note: See TracChangeset for help on using the changeset viewer.