Merge branch 'master' of git.kaiyuancloud.cn:yumoqing/ahserver
This commit is contained in:
commit
da29572e93
@ -38,9 +38,7 @@ class FunctionProcessor(BaseProcessor):
|
|||||||
# self.run_ns['request'] = request
|
# self.run_ns['request'] = request
|
||||||
# globals().update(self.run_ns)
|
# globals().update(self.run_ns)
|
||||||
|
|
||||||
debug(f'params_kw={params_kw}, {args=}')
|
|
||||||
env = {k:v for k,v in self.run_ns.items() if k not in ['params_kw', 'request'] }
|
env = {k:v for k,v in self.run_ns.items() if k not in ['params_kw', 'request'] }
|
||||||
debug(f'{env=}')
|
|
||||||
if inspect.iscoroutinefunction(f):
|
if inspect.iscoroutinefunction(f):
|
||||||
return await f(request, params_kw, *args, **env)
|
return await f(request, params_kw, *args, **env)
|
||||||
return f(request, params_kw, *args, **env)
|
return f(request, params_kw, *args, **env)
|
||||||
|
@ -32,6 +32,7 @@ from appPublic.rc4 import password, unpassword
|
|||||||
from appPublic.registerfunction import RegisterFunction
|
from appPublic.registerfunction import RegisterFunction
|
||||||
from appPublic.httpclient import HttpClient
|
from appPublic.httpclient import HttpClient
|
||||||
from appPublic.log import debug, exception
|
from appPublic.log import debug, exception
|
||||||
|
from appPublic.streamhttpclient import StreamHttpClient
|
||||||
|
|
||||||
from sqlor.dbpools import DBPools,runSQL,runSQLPaging
|
from sqlor.dbpools import DBPools,runSQL,runSQLPaging
|
||||||
from sqlor.filter import DBFilter, default_filterjson
|
from sqlor.filter import DBFilter, default_filterjson
|
||||||
@ -273,6 +274,7 @@ def initEnv():
|
|||||||
g.file_download = file_download
|
g.file_download = file_download
|
||||||
g.path_download = path_download
|
g.path_download = path_download
|
||||||
g.partial = partial
|
g.partial = partial
|
||||||
|
g.StreamHttpClient = StreamHttpClient
|
||||||
|
|
||||||
def set_builtins():
|
def set_builtins():
|
||||||
all_builtins = [ i for i in dir(builtins) if not i.startswith('_')]
|
all_builtins = [ i for i in dir(builtins) if not i.startswith('_')]
|
||||||
|
@ -10,6 +10,7 @@ import json
|
|||||||
|
|
||||||
from yarl import URL
|
from yarl import URL
|
||||||
|
|
||||||
|
import ssl
|
||||||
from aiohttp import client
|
from aiohttp import client
|
||||||
from aiohttp_auth import auth
|
from aiohttp_auth import auth
|
||||||
from appPublic.http_client import Http_Client
|
from appPublic.http_client import Http_Client
|
||||||
@ -73,7 +74,6 @@ def i18nDICT(request):
|
|||||||
l = c.langMapping.get(lang,lang)
|
l = c.langMapping.get(lang,lang)
|
||||||
return json.dumps(i18n.getLangDict(l)).encode(c.website.coding)
|
return json.dumps(i18n.getLangDict(l)).encode(c.website.coding)
|
||||||
|
|
||||||
|
|
||||||
class ProcessorResource(StaticResource,Url2File):
|
class ProcessorResource(StaticResource,Url2File):
|
||||||
def __init__(self, prefix: str, directory: PathLike,
|
def __init__(self, prefix: str, directory: PathLike,
|
||||||
*, name: Optional[str]=None,
|
*, name: Optional[str]=None,
|
||||||
|
Loading…
Reference in New Issue
Block a user