IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18409


Ignore:
Timestamp:
Jul 2, 2008, 2:19:19 PM (18 years ago)
Author:
jhoblitt
Message:

this is the first version tested to actual work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/replicate.pro

    r18404 r18409  
    11## replicate.pro : tasks for data replication : -*- sh -*-
    22## this file contains the tasks for maintaining duplicates as needed in Nebulous
    3 ## these tasks use the books replicatePending and regPendingExp
     3## these tasks use the books replicatePending
    44
    55# test for required global variables
    66check.globals
    77
    8 $NEB_DB   = nebulous
    9 $NEB_USER = nebulous
    10 $NEB_PASS = @neb@
     8$NEB_DB    = nebulous
     9$NEB_HOST  = alala
     10$NEB_USER  = jhipp
     11$NEB_PASS  = jhipp
    1112
    1213$LOGSUBDIR = $LOGDIR/replicate
     
    4243
    4344macro set.host.for.replicate
    44   if ($0 != 3)
    45     echo "USAGE: set.host.for.replicate (host name)"
     45  if ($0 != 2)
     46    echo "USAGE: set.host.for.replicate (hostname)"
    4647    break
    4748  end
     
    5455# parse volume name
    5556
    56   if ("$host" == "NULL")
     57  if ("$1" == "NULL")
    5758    host anyhost
    5859  else
    59     host $host
     60    host $1
    6061  end
    6162end
     
    6869
    6970  # modify these after the tasks are tested
    70   periods      -poll 60
    71   periods      -exec 300
     71  periods      -poll 5
     72  periods      -exec 120
    7273  periods      -timeout 60
    7374  npending     1
     
    7879
    7980  # command does not need to be dynamic
    80   command neb-admin --db $NEB_DB --user $NEB_USER --pass $NEB_PASS --pendingreplicate --limit 100
     81  command neb-admin --host $NEB_HOST --db $NEB_DB --user $NEB_USER --pass $NEB_PASS --pendingreplicate --limit 100
    8182
    8283  # success
    8384  task.exit $EXIT_SUCCESS
    8485    # convert 'stdout' to book format
    85     ipptool2book stdout replicatePending -key neb_id -uniq -setword pantaskState INIT
     86    ipptool2book stdout replicatePending -key key -uniq -setword pantaskState INIT
     87
    8688    if ($VERBOSE > 2)
    8789      book listbook replicatePending
     
    111113  task.exec
    112114    book npages replicatePending -var N
    113     if ($N == 0) break
    114115    if ($NETWORK == 0) break
     116    if ($N == 0)
     117        periods -exec 30
     118        break
     119    end
     120    periods -exec 0.1
    115121   
    116122    # look for new objects in replicatePending
Note: See TracChangeset for help on using the changeset viewer.