IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 2, 2008, 10:17:59 AM (18 years ago)
Author:
jhoblitt
Message:

first possibly working version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/replicate.pro

    r17578 r18404  
    55# test for required global variables
    66check.globals
     7
     8$NEB_DB   = nebulous
     9$NEB_USER = nebulous
     10$NEB_PASS = @neb@
    711
    812$LOGSUBDIR = $LOGDIR/replicate
     
    3741end
    3842
     43macro set.host.for.replicate
     44  if ($0 != 3)
     45    echo "USAGE: set.host.for.replicate (host name)"
     46    break
     47  end
     48
     49  if (not($PARALLEL))
     50    host local
     51    return
     52  end
     53
     54# parse volume name
     55
     56  if ("$host" == "NULL")
     57    host anyhost
     58  else
     59    host $host
     60  end
     61end
     62
    3963# the replicate process interacts with only the single Nebulous server
    4064
     
    5478
    5579  # command does not need to be dynamic
    56   command neb-load-replicants -limit 20
     80  command neb-admin --db $NEB_DB --user $NEB_USER --pass $NEB_PASS --pendingreplicate --limit 100
    5781
    5882  # success
     
    97121
    98122    # XXX what values do I need to get back?
    99     book getword replicatePending $pageName neb_id       -var NEB_ID
    100     book getword replicatePending $pageName ncopies      -var NCOPIES
    101     book getword replicatePending $pageName neb_host     -var NEB_HOST
    102     book getword replicatePending $pageName target_host  -var TARGET_HOST
     123    book getword replicatePending $pageName key         -var KEY
     124    book getword replicatePending $pageName need_copies -var NEED_COPIES
     125    book getword replicatePending $pageName volume_name -var VOLUME_NAME
     126    book getword replicatePending $pageName volume_host -var VOLUME_HOST
     127
     128    set.host.for.replicate $VOLUME_HOST
    103129
    104130    stdout NULL
     
    106132
    107133    # these operations do not require a database to be specified
    108     $run = replicate_object.pl --neb_id $NEB_ID --ncopies $NCOPIES --neb_host $NEB_HOST
     134    $run = neb-replicate --copies $NEED_COPIES $KEY
    109135
    110136    # save the pageName for future reference below
Note: See TracChangeset for help on using the changeset viewer.