IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 6, 2010, 9:02:56 AM (16 years ago)
Author:
bills
Message:

add macro to set the poll limit used for stacks. Remove the commented
out cleanup code. It has been moved to science.cleanup.pro.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/stack.pro

    r28649 r29689  
    88check.globals
    99
     10if ($?POLL_LIMIT_STACK == 0) set POLL_LIMIT_STACK = 10
     11
     12macro set.stack.poll
     13  if ($0 != 2)
     14    echo "USAGE:set.stack.poll (value)"
     15    break
     16  end
     17
     18  $POLL_LIMIT_STACK = $1
     19end
     20
    1021### Initialise the books containing the tasks to do
    1122book init stackSumSkyfile
    1223book init stackPendingSummary
    13 #book init stackCleanup
    1424
    1525### Database lists
    1626$stackSkycell_DB = 0
    1727$stack_revert_DB = 0
    18 #$stackCleanup_DB = 0
    1928$stackSummary_DB = 0
    2029
     
    2231macro stack.status
    2332  book listbook stackSumSkyfile
    24 #  book listbook stackCleanup
    2533end
    2634
     
    2937  book init stackSumSkyfile
    3038  book init stackPendingSummary
    31 #  book init stackCleanup
    3239end
    3340
     
    8188  end
    8289end
    83 
    84 
    85 
    86 
    87 
    88 # macro stack.cleanup.on
    89 #   task stack.cleanup.load
    90 #     active true
    91 #   end
    92 #   task stack.cleanup.run
    93 #     active true
    94 #   end
    95 # end
    96 
    97 # macro stack.cleanup.off
    98 #   task stack.cleanup.load
    99 #     active false
    100 #   end
    101 #   task stack.cleanup.run
    102 #     active false
    103 #   end
    104 # end
    10590
    10691
     
    132117    add_poll_args run
    133118    add_poll_labels run
    134     # reduce the limit (the last one takes precedence)
    135     $run = $run -limit 40
     119    # change the limit (the last one on the command line takes precedence)
     120    $run = $run -limit $POLL_LIMIT_STACK
    136121    command $run
    137122  end
     
    246231  end
    247232end
    248 
    249 
    250 # # select images ready for stack analysis
    251 # # new entries are added to stackCleanup
    252 # # skip already-present entries
    253 # task         stack.cleanup.load
    254 #   host         local
    255 
    256 #   periods      -poll $LOADPOLL
    257 #   periods      -exec $LOADEXEC
    258 #   periods      -timeout 30
    259 #   npending     1
    260 #   active       false
    261 
    262 #   stdout NULL
    263 #   stderr $LOGDIR/stack.cleanup.log
    264 
    265 #   task.exec
    266 #     if ($LABEL:n == 0) break
    267 #     $run = stacktool -pendingcleanuprun
    268 #     if ($DB:n == 0)
    269 #       option DEFAULT
    270 #     else
    271 #       # save the DB name for the exit tasks
    272 #       option $DB:$stackCleanup_DB
    273 #       $run = $run -dbname $DB:$stackCleanup_DB
    274 #       $stackCleanup_DB ++
    275 #       if ($stackCleanup_DB >= $DB:n) set stackCleanup_DB = 0
    276 #     end
    277 #     add_poll_args run
    278 #     add_poll_labels run
    279 #     command $run
    280 #   end
    281 
    282 #   # success
    283 #   task.exit    0
    284 #     # convert 'stdout' to book format
    285 #     ipptool2book stdout stackCleanup -key stack_id -uniq -setword dbname $options:0 -setword pantaskState INIT
    286 #     if ($VERBOSE > 2)
    287 #       book listbook stackCleanup
    288 #     end
    289 
    290 #     # delete existing entries in the appropriate pantaskStates
    291 #     process_cleanup stackCleanup
    292 #   end
    293 
    294 #   # locked list
    295 #   task.exit    default
    296 #     showcommand failure
    297 #   end
    298 
    299 #   task.exit    crash
    300 #     showcommand crash
    301 #   end
    302 
    303 #   # operation times out?
    304 #   task.exit    timeout
    305 #     showcommand timeout
    306 #   end
    307 # end
    308 
    309 # # run the ipp_cleanup.pl script on pending images
    310 # task         stack.cleanup.run
    311 #   periods      -poll $RUNPOLL
    312 #   periods      -exec $RUNEXEC
    313 #   periods      -timeout 60
    314 #   active       false
    315 
    316 #   task.exec
    317 #     book npages stackCleanup -var N
    318 #     if ($N == 0) break
    319 #     if ($NETWORK == 0) break
    320    
    321 #     # look for new images in stackCleanup (pantaskState == INIT)
    322 #     book getpage stackCleanup 0 -var pageName -key pantaskState INIT
    323 #     if ("$pageName" == "NULL") break
    324 
    325 #     book setword stackCleanup $pageName pantaskState RUN
    326 #     book getword stackCleanup $pageName camera -var CAMERA
    327 #     book getword stackCleanup $pageName state -var CLEANUP_MODE
    328 #     book getword stackCleanup $pageName stack_id -var STACK_ID
    329 #     book getword stackCleanup $pageName dbname -var DBNAME
    330 
    331 #     # specify choice of local or remote host based on camera and stack (class_id)
    332 #     set.host.for.camera $CAMERA FPA
    333 
    334 #     stdout $LOGDIR/stack.cleanup.log
    335 #     stderr $LOGDIR/stack.cleanup.log
    336 
    337 #     # XXX is everything listed here needed?
    338 #     $run = ipp_cleanup.pl --stage stack --stage_id $STACK_ID --camera $CAMERA --mode $CLEANUP_MODE
    339 #     add_standard_args run
    340 
    341 #     # save the pageName for future reference below
    342 #     options $pageName
    343 
    344 #     # create the command line
    345 #     if ($VERBOSE > 1)
    346 #       echo command $run
    347 #     end
    348 #     command $run
    349 #   end
    350 
    351 #   # default exit status
    352 #   task.exit    default
    353 #     process_exit stackCleanup $options:0 $JOB_STATUS
    354 #   end
    355 
    356 #   task.exit    crash
    357 #     showcommand crash
    358 #     book setword stackCleanup $options:0 pantaskState CRASH
    359 #   end
    360 
    361 #   # operation timed out?
    362 #   task.exit    timeout
    363 #     showcommand timeout
    364 #     book setword stackCleanup $options:0 pantaskState TIMEOUT
    365 #   end
    366 # end
    367 
    368 
    369233
    370234
Note: See TracChangeset for help on using the changeset viewer.