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