add 'template' services

This commit is contained in:
2019-12-02 14:22:40 +01:00
parent 0846c4c5cc
commit 939f93253e
16 changed files with 179 additions and 40 deletions

View File

@ -60,7 +60,7 @@ class CallDispatcher:
mandatories = list(config.value.mandatory())
if mandatories:
mand = [mand.split('.')[-1] for mand in mandatories]
raise ValueError(_(f'missing parameters in response: {mand}'))
raise ValueError(_(f'missing parameters in response: {mand} in message "{risotto_context.message}"'))
try:
config.value.dict()
except Exception as err:
@ -238,6 +238,10 @@ class Dispatcher(register.RegisterDispatcher, CallDispatcher, PublishDispatcher)
# return the config
return config
def get_service(self,
name: str):
return self.injected_self[name]
dispatcher = Dispatcher()
register.dispatcher = dispatcher