IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.