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