From e237ee550d9dd0ad329cbfae268e34043c3568af Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 29 Apr 2026 21:45:26 +0800 Subject: [PATCH] bugfix --- wwwroot/test_pricing_program.dspy | 34 +++++++++++++++++-------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/wwwroot/test_pricing_program.dspy b/wwwroot/test_pricing_program.dspy index fd47f18..d15e931 100644 --- a/wwwroot/test_pricing_program.dspy +++ b/wwwroot/test_pricing_program.dspy @@ -1,15 +1,19 @@ -ppid = 'sF2gcl7UeANKtnZv8hfvL' -data = { - 'action': 't2v', - 'model': 'viduq3-pro', - 'resolution': '1024p', - 'duration': 10, - 'off_peak': False -} -db = DBPools() -dbname = get_module_dbname('pricing') -async with db.sqlorContext(dbname) as sor: - x = await pricing_program_charging(sor, ppid, data) - return x - -return f'Except:{db.e_except},{format_exc()}' +ppid = params_kw.ppid +data = params_kw.data +try: + x = buffered_charging(ppid, data) + return { + "status": "ok", + "data": { + "ppid": ppid, + "data": data, + "result": x + } + } +except Exception as e: + return { + "status": "error", + "data": { + "message": f'{ppid=}, {data=}, {e}' + } + }