IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 17, 2009, 11:08:44 AM (17 years ago)
Author:
eugene
Message:

add so_id_start and so_id_range to neb-admin pendingreplicate and replicate task

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/replicate.pro

    r23230 r23345  
    6262# the replicate process interacts with only the single Nebulous server
    6363
     64# Each 'pendingreplicate' query is limited to a finite number of so_id values. 
     65# Each time we call replicate.load, we increment SO_ID_START by the range value. 
     66# If the pendingreplicate query exits with exit status 10, we start over at 0
     67
     68$SO_ID_START = 0
     69$SO_ID_RANGE = 100000
     70
    6471# select Nebulous objects which desire additional copies
    6572task           replicate.load
     
    6875  # modify these after the tasks are tested
    6976  periods      -poll 10
    70   periods      -exec 1
     77  periods      -exec 10
    7178  periods      -timeout 1500
    7279  npending     1
     
    7986      # command does not need to be dynamic, but having it so allows us to adjust the periods
    8087      # so that we dont have to wait 10 minutes for things to start up
    81       command neb-admin --host $NEB_HOST --db $NEB_DB --user $NEB_USER --pass $NEB_PASS --pendingreplicate --limit 7500
     88      # 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
    8290      periods      -exec 1800
    8391
     
    8694  # success
    8795  task.exit $EXIT_SUCCESS
     96    # advance the so_id counter
     97    $SO_ID_START += $SO_ID_RANGE
     98
    8899    # convert 'stdout' to book format
    89100    ipptool2book stdout replicatePending -key key -uniq -setword pantaskState INIT
     
    95106    # delete existing entries in the appropriate pantaskStates
    96107    process_cleanup replicatePending
     108  end
     109
     110  # out of so_id range, reset
     111  task.exit 10
     112    # advance the so_id counter
     113    $SO_ID_START = 0
    97114  end
    98115
Note: See TracChangeset for help on using the changeset viewer.