fix(计划): 定时触发补 app context;账号状态加检测时间与历史记录
- _fire 内调用 run_plan(修复 18:00 Working outside application context,无运行记录) - device_account 新增 status_checked_at;新表 account_status_log(schema v23) - 每次检测/手改留痕;资产表显示检测时间 + 「记录」弹窗 - API /api/af/account_status_logs;备份标签/文档/测试同步
This commit is contained in:
@@ -1289,7 +1289,11 @@ class GenericStepsWorker(BaseWorker):
|
||||
if text:
|
||||
try:
|
||||
from core import account_folder as _af
|
||||
if not _af.set_account_status(who, text):
|
||||
_ctx = getattr(self, "ctx", None) or {}
|
||||
_src = "计划运行" if _ctx.get("plan_id") else "任务运行"
|
||||
if not _af.set_account_status(
|
||||
who, text, source=_src,
|
||||
run_id=str(_ctx.get("run_id") or "")):
|
||||
_log.warning(f"[{self.serial}] 账号状态未回写:账号库里没有『{who}』")
|
||||
except Exception as e:
|
||||
_log.warning(f"[{self.serial}] 账号状态回写失败(不影响任务): {e}")
|
||||
|
||||
Reference in New Issue
Block a user