This commit is contained in:
yumoqing 2025-08-24 09:44:00 +08:00
parent 29fb809af0
commit eeffdf76c7
5 changed files with 5 additions and 5 deletions

Binary file not shown.

View File

@ -5,9 +5,9 @@ from sqlor.dbpools import DBPools
from ahserver.serverenv import ServerEnv, get_serverenv
class DownloadMgr:
def __init__(self,request):
def __init__(self, request, env=DictObject()):
self.request = request
self.env = request['run_ns']
self.env = env
self.uapi = self.env.UAPI(request, **self.env)
self.uappid = 'downloader'

View File

@ -1,5 +1,5 @@
#
dmgr = DownloadMgr(request)
dmgr = DownloadMgr(request, DictObject(**globals()))
try:
x = await dmgr.download(params_kw.url)
return UiMessage(title='download', message=f'download submited')

View File

@ -5,7 +5,7 @@
"height":"100%"
},
"subwidgets":[
{% set dmgr = DownloadMgr(request) %}
{% set dmgr = DownloadMgr(request, DictObject(**globals())) %}
{% for task in dmgr.get_user_tasks() %}
{
"widgettype":"urlwidget",

View File

@ -1,4 +1,4 @@
{% set dmgr=DownloadMgr(request) %}
{% set dmgr=DownloadMgr(request, DictObject(**globals())) %}
{% set status=dmgr.get_task_status(params_kw.taskid) %}
{
"widgettype":"VBox",