cf = Foundation({'apikey' : apikey, 'myip' : myip, 'cifrouter' : cifrouter, 'controlport' : controlport, 'myid' : myid, 'routerid' : "cif-router", 'thread_tracker' : thread_tracker }) primary_index = PrimaryIndex(connectionPool, debug) secondary_index = SecondaryIndex(connectionPool, debug) print "Configuring foundation" cf.setdebug(debug) cf.setdefaultcallback(controlMessageHandler, {'connectionPool': connectionPool}) print "Register with " + cifrouter + " (req->rep)" req = cf.ctrlsocket() # apikey, req, myip, myid, cifrouter (routerport, routerpubport) = cf.register() subscriber = cf.subscribersocket() time.sleep(1) # wait for router to connect, sort of lame but see this a lot in zmq code print "Initializing Exploder" exploder = Exploder.Exploder(connectionPool, thread_tracker, False) print "Initializing Purger"
apikey = apikeys.get_by_alias(myid) print "Initializing foundation" cf = Foundation({'apikey' : apikey, 'myip' : myip, 'cifrouter' : cifrouter, 'controlport' : controlport, 'myid' : myid, 'routerid' : "cif-router" }) print "Configuring foundation" cf.setdebug(debug) cf.setdefaultcallback(controlMessageHandler) print "Register with " + cifrouter + " (req->rep)" req = cf.ctrlsocket() # apikey, req, myip, myid, cifrouter (routerport, routerpubport) = cf.register() subscriber = cf.subscribersocket() time.sleep(1) # wait for router to connect, sort of lame but see this a lot in zmq code print "Initializing Exploder" exploder = Exploder.Exploder(hbhost, False) exploder.do_some_work()