-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError 'REDIS_URIS' #7
Comments
Hello, I cannot reproduce with this example from nameko.runners import ServiceRunner
import eventlet;
eventlet.monkey_patch()
from nameko.rpc import rpc
from nameko_redis import Redis
class MyService(object):
name = "my_service"
redis = Redis('redis')
@rpc
def hello(self, name):
self.redis.set("foo", name)
return "Hello, {}!".format(name)
@rpc
def bye(self):
name = self.redis.get("foo")
return "Bye, {}!".format(name)
config = {
'REDIS_URIS': {'redis': 'redis://127.0.0.1:32768/10'},
'AMQP_URI': 'pyamqp://guest:guest@localhost',
'WEB_SERVER_ADDRESS': '0.0.0.0:8000',
'rpc_exchange': 'nameko-rpc',
'max_workers': 10,
'parent_calls_tracked': 10
}
runner = ServiceRunner(config=config)
runner.add_service(MyService)
runner.start() can you maybe provide a code for your services? |
Yes, of course
|
@staskuban I looked at your code and traceback and looks like even though you've defined your own service runner, you still run your service with Custom service runner seems to require more complicated logic (see example from nameko CLI run https://github.com/nameko/nameko/blob/cc13802d8afb059419384e2e2016bae7fe1415ce/nameko/cli/run.py#L116 ) If you want to run your service with |
With config for serviceRunner i got
KeyError: 'REDIS_URIS'
Sample serviceRunner code:
Full error message:
Can you help with my problem?
The text was updated successfully, but these errors were encountered: