--- a/dbapi.py Fri Sep 28 17:49:54 2012 +0200
+++ b/dbapi.py Tue Oct 02 16:44:55 2012 +0200
@@ -104,7 +104,7 @@
return Repository(config, TasksManager(), vreg=vreg)
elif method == 'zmq':
from cubicweb.zmqclient import ZMQRepositoryClient
- return ZMQRepositoryClient(config, vreg=vreg)
+ return ZMQRepositoryClient(database)
else: # method == 'pyro'
# resolve the Pyro object
from logilab.common.pyro_ext import ns_get_proxy, get_proxy
--- a/server/test/unittest_repository.py Fri Sep 28 17:49:54 2012 +0200
+++ b/server/test/unittest_repository.py Tue Oct 02 16:44:55 2012 +0200
@@ -416,8 +416,7 @@
def _zmq_client(self, done):
cnxprops = ConnectionProperties('zmq')
try:
- cnx = connect(self.repo.config.appid, u'admin', password=u'gingkow',
- host='tcp://127.0.0.1:41415',
+ cnx = connect('tcp://127.0.0.1:41415', u'admin', password=u'gingkow',
cnxprops=cnxprops,
initlog=False) # don't reset logging configuration
try:
--- a/zmqclient.py Fri Sep 28 17:49:54 2012 +0200
+++ b/zmqclient.py Tue Oct 02 16:44:55 2012 +0200
@@ -43,12 +43,9 @@
ZMQ is used as the transport layer and cPickle is used to serialize data.
"""
- def __init__(self, config, vreg=None):
- self.config = config
- self.vreg = vreg
+ def __init__(self, zmq_address):
self.socket = ctx.socket(zmq.REQ)
- self.host = config.get('base-url')
- self.socket.connect(self.host)
+ self.socket.connect(zmq_address)
def __zmqcall__(self, name, *args, **kwargs):
self.socket.send_pyobj([name, args, kwargs])