bugfix
This commit is contained in:
parent
56123cf1bf
commit
a88b3f90fe
@ -28,11 +28,14 @@ class FunctionProcessor(BaseProcessor):
|
|||||||
ns = DictObject(**self.run_ns)
|
ns = DictObject(**self.run_ns)
|
||||||
rf = RegisterFunction()
|
rf = RegisterFunction()
|
||||||
f = rf.get(rfname)
|
f = rf.get(rfname)
|
||||||
|
if f is None:
|
||||||
|
error(f'{rfname=} is not registered')
|
||||||
|
return None
|
||||||
self.run_ns['request'] = request
|
self.run_ns['request'] = request
|
||||||
globals().update(self.run_ns)
|
globals().update(self.run_ns)
|
||||||
if inspect.iscoroutinefunction(f):
|
if inspect.iscoroutinefunction(f):
|
||||||
return await f(*args, **self.run_ns)
|
return await f(*args, **self.run_ns)
|
||||||
return f(*args)
|
return f(*args, **self.run_ns)
|
||||||
|
|
||||||
async def datahandle(self,request):
|
async def datahandle(self,request):
|
||||||
x = await self.path_call(request, self.path)
|
x = await self.path_call(request, self.path)
|
||||||
|
Loading…
Reference in New Issue
Block a user