Compare commits
No commits in common. "f67393174bfc756180ad10a883a2cae1eca823cb" and "56123cf1bffbd2fce812d931c14e680309dc43f4" have entirely different histories.
f67393174b
...
56123cf1bf
@ -2,7 +2,6 @@
|
|||||||
import inspect
|
import inspect
|
||||||
from appPublic.dictObject import DictObject
|
from appPublic.dictObject import DictObject
|
||||||
from appPublic.registerfunction import RegisterFunction
|
from appPublic.registerfunction import RegisterFunction
|
||||||
from appPublic.log import info, debug, warning, error, exception, critical
|
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
from aiohttp.web_response import Response, StreamResponse
|
from aiohttp.web_response import Response, StreamResponse
|
||||||
from .baseProcessor import BaseProcessor
|
from .baseProcessor import BaseProcessor
|
||||||
@ -29,14 +28,11 @@ 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, **self.run_ns)
|
return f(*args)
|
||||||
|
|
||||||
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