IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 29, 2011, 11:26:31 AM (15 years ago)
Author:
eugene
Message:

merging changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110505/ippTasks/lap.pro

    r31454 r31587  
    1717
    1818macro lap.show.books
     19    echo "lapNewRuns"
    1920    book listbook lapNewRuns
     21    echo "lapRunRuns"
    2022    book listbook lapRunRuns
     23    echo "lapDoneRuns"
    2124    book listbook lapDoneRuns
     25    echo "lapFullRuns"
    2226    book listbook lapFullRuns
     27end
     28
     29macro lap.clear.books
     30    book init lapNewRuns
     31    book init lapRunRuns
     32    book init lapFullRuns
     33    book init lapDoneRuns
    2334end
    2435
     
    3647      active true
    3748    end
    38     task lap.cleanup.load
    39       active true
    40     end
    41     task lap.cleanup.run
    42       active true
    43     end
    4449end
    4550
     
    5762      active false
    5863    end
    59     task lap.cleanup.load
    60       active false
    61     end
    62     task lap.cleanup.run
     64end
     65
     66macro lap.debug.mode
     67    task lap.initial.load
     68      active true
     69    end
     70    task lap.initial.run
     71      active false
     72    end
     73    task lap.monitor.load
     74      active true
     75    end
     76    task lap.monitor.run
    6377      active false
    6478    end
     
    156170  # success
    157171  task.exit  0
    158 #    book delpage lapNewRuns $options:0
    159172    ipptool2book stdout lapNewRuns -uniq -key lap_id -setword dbname $options:0 -setword pantaskState INIT
    160173
     174    process_cleanup lapNewRuns
     175
    161176    if ($VERBOSE > 2)
    162177      book listbook lapNewRuns
     
    181196  periods      -exec $LOADEXEC
    182197  periods      -timeout 600
     198  active       false
    183199# This can probably be increased and spread over hosts in the future.
    184200  npending     1           
     
    193209
    194210
    195     book getpage lapNewRuns $lap_NewPage -var lapNewPageName
     211    book getpage lapNewRuns 0 -var lapNewPageName -key pantaskState INIT
    196212
    197213    $lap_NewPage ++
    198214    if ($lap_NewPage >= $N) set lap_NewPage = 0
    199215
    200 
    201216    if ("$lapNewPageName" == "NULL") break
     217
     218
    202219
    203220    book setword lapNewRuns $lapNewPageName pantaskState RUN
     
    205222    book getword lapNewRuns $lapNewPageName dbname -var DBNAME
    206223
     224    option $LAP_ID
     225
    207226    $run = lap_science.pl --chip_mode --dbname $DBNAME --lap_id $LAP_ID
    208 
    209     command $run
    210 
    211   end
    212 
    213   # success
    214   task.exit  0
    215 #    book delpage lapNewRuns $options:0
    216 #    ipptool2book stdout lapNewRuns -uniq -key lap_id
    217 
     227   
     228    command $run
     229
     230  end
     231
     232  # success
     233  task.exit  0
     234    process_exit lapNewRuns $options:0 0
    218235    if ($VERBOSE > 2)
    219236      book listbook lapNewRuns
     
    222239  # locked list
    223240  task.exit    default
    224     showcommand failure
    225   end
    226   task.exit    crash
    227     showcommand crash
    228   end
    229   #operation times out?
    230   task.exit    timeout
     241    process_exit lapNewRuns $options:0 0
     242    showcommand failure
     243  end
     244  task.exit    crash
     245    process_exit lapNewRuns $options:0 0
     246    showcommand crash
     247  end
     248  #operation times out?
     249  task.exit    timeout
     250    process_exit lapNewRuns $options:0 0
    231251    showcommand timeout
    232252  end
     
    267287
    268288    add_poll_labels run
    269 #    echo $run
    270     command $run
    271   end
    272   # success
    273   task.exit  0
    274 #    book delpage lapRunRuns $options:0
     289    command $run
     290  end
     291  # success
     292  task.exit  0
    275293    ipptool2book stdout lapRunRuns -uniq -key lap_id -setword dbname $options:0 -setword pantaskState INIT
     294   
     295    process_cleanup lapRunRuns
    276296
    277297    if ($VERBOSE > 2)
     
    297317  periods      -exec $LOADEXEC
    298318  periods      -timeout 600
     319  active       false
    299320# This can probably be increased and spread over hosts in the future.
    300321  npending     1           
     
    306327    book npages lapRunRuns -var N
    307328
    308 #    echo $N $NETWORK
    309329    if ($N == 0) break
    310330    if ($NETWORK == 0) break
    311331
    312332
    313     book getpage lapRunRuns $lap_RunPage -var lapRunPageName
     333    book getpage lapRunRuns 0 -var lapRunPageName -key pantaskState INIT
    314334
    315335    $lap_RunPage ++
    316336    if ($lap_RunPage >= $N) set lap_RunPage = 0
    317337
    318 #    echo $lapRunPageName
    319338    if ("$lapRunPageName" == "NULL") break
    320339
     
    323342    book getword lapRunRuns $lapRunPageName dbname -var DBNAME
    324343
     344    option $LAP_ID
     345
    325346    $run = lap_science.pl --monitor_mode --dbname $DBNAME --lap_id $LAP_ID
    326347
     
    331352  # success
    332353  task.exit  0
    333 #    book delpage lapRunRuns $options:0
    334 #    ipptool2book stdout lapRunRuns -uniq -key lap_id
    335 
    336     if ($VERBOSE > 2)
     354    process_exit lapRunRuns $options:0 0
     355    if ($VERBOSE > 2)
     356
    337357      book listbook lapRunRuns
    338358    end
     
    340360  # locked list
    341361  task.exit    default
    342     showcommand failure
    343   end
    344   task.exit    crash
    345     showcommand crash
    346   end
    347   #operation times out?
    348   task.exit    timeout
     362    process_exit lapRunRuns $options:0 0
     363    showcommand failure
     364  end
     365  task.exit    crash
     366    process_exit lapRunRuns $options:0 0
     367    showcommand crash
     368  end
     369  #operation times out?
     370  task.exit    timeout
     371    process_exit lapRunRuns $options:0 0
    349372    showcommand timeout
    350373  end
     
    358381  periods      -exec $LOADEXEC
    359382  periods      -timeout 30
     383  active       false
    360384  npending     1
    361385
     
    390414    ipptool2book stdout lapDoneRuns -uniq -key lap_id  -setword dbname $options:0 -setword pantaskState INIT
    391415
     416    process_cleanup lapDoneRuns
    392417    if ($VERBOSE > 2)
    393418      book listbook lapRuns
     
    412437  periods      -exec $LOADEXEC
    413438  periods      -timeout 600
     439  active       false
    414440# This can probably be increased and spread over hosts in the future.
    415441  npending     1           
     
    424450
    425451
    426     book getpage lapDoneRuns $lap_DonePage -var lapDonePageName
     452    book getpage lapDoneRuns 0 -var lapDonePageName -key pantaskState INIT
    427453
    428454    $lap_DonePage ++
     
    435461    book getword lapDoneRuns $lapDonePageName dbname -var DBNAME
    436462
     463    option $LAP_ID
    437464    $run = lap_science.pl --cleanup_mode --dbname $DBNAME --lap_id $LAP_ID
    438465
     
    443470  # success
    444471  task.exit  0
    445 #    ipptool2book stdout lapDoneRuns -uniq -key lap_id
    446 
     472    process_exit lapDoneRuns $options:0 0
    447473    if ($VERBOSE > 2)
    448474      book listbook lapDoneRuns
     
    451477  # locked list
    452478  task.exit    default
    453     showcommand failure
    454   end
    455   task.exit    crash
    456     showcommand crash
    457   end
    458   #operation times out?
    459   task.exit    timeout
    460     showcommand timeout
    461   end
    462 end
     479    process_exit lapDoneRuns $options:0 0
     480    showcommand failure
     481  end
     482  task.exit    crash
     483    process_exit lapDoneRuns $options:0 0
     484    showcommand crash
     485  end
     486  #operation times out?
     487  task.exit    timeout
     488    process_exit lapDoneRuns $options:0 0
     489    showcommand timeout
     490  end
     491end
Note: See TracChangeset for help on using the changeset viewer.