Skip to content

Commit

Permalink
parameterizing memcache and cluster key
Browse files Browse the repository at this point in the history
  • Loading branch information
progrium committed Dec 21, 2010
1 parent e57ac31 commit f5d50c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions core.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@

use_hub('zeromq')

datastore = memcache.Client(['127.0.0.1:11211'], debug=0)
interface = sys.argv[1]

ctx = zmq.Context()
cluster_address, cluster_key = sys.argv[2].split('/')

interface = sys.argv[1]
datastore = memcache.Client([cluster_address], debug=0)

ctx = zmq.Context()

cluster = ClusterNode(datastore, 'miyamoto-cluster', interface, ttl=10)
cluster = ClusterNode(datastore, cluster_key, interface, ttl=10)
cluster.join()

agenda = Agenda(datastore, 'miyamoto-data')
Expand Down
1 change: 1 addition & 0 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ cd zeromq-2.0.10
./configure
sudo make install
sudo /usr/local/python/bin/easy_install-2.5 pyzmq
sudo /usr/local/python/bin/easy_install-2.5 python-memcached

LD_LIBRARY_PATH=/usr/local/lib

0 comments on commit f5d50c1

Please sign in to comment.