nameko
nameko copied to clipboard
When using cassandra database with nameko Cassandra connection is Refused
So I tried to use cassandra database with nameko for one of my project and when i tried to connect to database in nameko service the connection is refusing where outside the nameko its working fine.I hope it might be due to eventlet so is there any work around for this? Thanks in Advance and Here is the code,
`from nameko.rpc import rpc from models import get_all, get_city import json from cassandra.cqlengine import connection
connection.setup(["127.0.0.1"],"cities",protocol_version=3) class CityService: name = "city_service"
@rpc
def get_all_cities(self):
cities=get_all()
return cities
@rpc
def get_city(self,city_id):
city=get_city(city_id)
return city
`
I have the same problem.