simplify publish function

This commit is contained in:
Emmanuel Garette 2020-04-23 07:39:22 +02:00
parent 9741669487
commit 664a2404fa
1 changed files with 33 additions and 36 deletions

View File

@ -147,7 +147,6 @@ class PublishDispatcher:
check_role, check_role,
kwargs, kwargs,
function_objs) function_objs)
else:
try: try:
async with self.pool.acquire() as connection: async with self.pool.acquire() as connection:
await connection.set_type_codec( await connection.set_type_codec(
@ -329,8 +328,6 @@ class Dispatcher(register.RegisterDispatcher,
if key in function_obj['arguments']: if key in function_obj['arguments']:
kw[key] = value kw[key] = value
kw['risotto_context'] = risotto_context kw['risotto_context'] = risotto_context
returns = await function(self.injected_self[function_obj['module']], **kw) returns = await function(self.injected_self[function_obj['module']], **kw)
if risotto_context.type == 'rpc': if risotto_context.type == 'rpc':