IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 26, 2009, 9:46:38 AM (17 years ago)
Author:
eugene
Message:

max of 2000 outstanding replicate jobs; if the query hits the max, keep the query in range, adjust timeouts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/replicate.pro

    r23345 r23561  
    7474
    7575  # modify these after the tasks are tested
    76   periods      -poll 10
    77   periods      -exec 10
     76  periods      -poll 0.5
     77  periods      -exec 5
    7878  periods      -timeout 1500
    7979  npending     1
     
    8484
    8585  task.exec
     86      book npages replicatePending -var N
     87      if ($N > 2000)
     88        process_cleanup replicatePending
     89        break
     90      end     
     91
    8692      # command does not need to be dynamic, but having it so allows us to adjust the periods
    8793      # so that we dont have to wait 10 minutes for things to start up
    8894      # XXX smaller limited?  7500 will be a huge book of things to do...
    89       command neb-admin --host $NEB_HOST --db $NEB_DB --user $NEB_USER --pass $NEB_PASS --pendingreplicate --limit 7500 --so_id_start $SO_ID_START --so_id_range $SO_ID_RANGE
    90       periods      -exec 1800
    91 
    92   end
    93 
    94   # success
    95   task.exit $EXIT_SUCCESS
     95      command neb-admin --host $NEB_HOST --db $NEB_DB --user $NEB_USER --pass $NEB_PASS --pendingreplicate --limit 500 --so_id_start $SO_ID_START --so_id_range $SO_ID_RANGE
     96      # periods      -exec 1800
     97  end
     98
     99  # success : 0 -- we did not hit the limit, advance so_id counter
     100  task.exit 0
    96101    # advance the so_id counter
    97     $SO_ID_START += $SO_ID_RANGE
    98 
     102    $SO_ID_START = $SO_ID_START + $SO_ID_RANGE
     103
     104    # convert 'stdout' to book format
     105    ipptool2book stdout replicatePending -key key -uniq -setword pantaskState INIT
     106
     107    if ($VERBOSE > 2)
     108      book listbook replicatePending
     109    end
     110
     111    # delete existing entries in the appropriate pantaskStates
     112    process_cleanup replicatePending
     113  end
     114
     115  # success : 1 -- we DID hit the limit, do NOT advance so_id counter
     116  task.exit 1
    99117    # convert 'stdout' to book format
    100118    ipptool2book stdout replicatePending -key key -uniq -setword pantaskState INIT
     
    131149# create the desired replicas
    132150task           replicate.run
    133   periods      -poll $RUNPOLL
    134   periods      -exec 30
     151  periods      -poll 0.5
     152  periods      -exec 5
    135153  periods      -timeout 30
    136154
     
    139157    if ($NETWORK == 0) break
    140158    if ($N == 0)
    141         periods -exec 30
     159        periods -exec 5
    142160        break
    143161    end
Note: See TracChangeset for help on using the changeset viewer.