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/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.