# ETL: 每小时聚合 dm_model_call_fact → dm_model_perf_daily ip = request['client_ip'] if ip not in ['127.0.0.1']: return ip import json from sage_datamart.etl import ensure_tables, aggregate_daily_perf env = request._run_ns async with get_sor_context(env, 'sage_datamart') as sor: await ensure_tables(sor) count = await aggregate_daily_perf(sor) return json.dumps({'status': 'ok', 'aggregated': count})