bugfix
This commit is contained in:
parent
9eee140bfa
commit
b0938027f4
@ -26,8 +26,7 @@ class RegisterFunction:
|
|||||||
print(f'{name} is a coro')
|
print(f'{name} is a coro')
|
||||||
return None
|
return None
|
||||||
if f:
|
if f:
|
||||||
f1 = awaitify(f)
|
return f(*args, **kw)
|
||||||
return f1(*args, **kw)
|
|
||||||
error(f'{name} not register')
|
error(f'{name} not register')
|
||||||
|
|
||||||
async def exe(self, name, *args, **kw):
|
async def exe(self, name, *args, **kw):
|
||||||
@ -38,7 +37,8 @@ class RegisterFunction:
|
|||||||
if iscoroutinefunction(f):
|
if iscoroutinefunction(f):
|
||||||
# info(f'{name=} is coroutine function');
|
# info(f'{name=} is coroutine function');
|
||||||
return await f(*args, **kw)
|
return await f(*args, **kw)
|
||||||
return f(*args, **kw)
|
f1 = awaitify(f)
|
||||||
|
return f1(*args, **kw)
|
||||||
|
|
||||||
@SingletonDecorator
|
@SingletonDecorator
|
||||||
class RegisterCoroutine:
|
class RegisterCoroutine:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user