完成 Ruff 全量清理

This commit is contained in:
yml2213
2026-08-31 10:55:44 +08:00
parent 840af3108e
commit 09ab80e062
68 changed files with 323 additions and 291 deletions
+2 -3
View File
@@ -348,9 +348,8 @@ def cleanup_orphan_huya_tasks(
query = db.query(HuyaTask).filter(HuyaTask.status.in_(statuses))
if batch_id:
query = query.filter(HuyaTask.batch_id == batch_id)
elif active_batch_ids is not None:
if active_batch_ids:
query = query.filter(~HuyaTask.batch_id.in_(list(active_batch_ids)))
elif active_batch_ids is not None and active_batch_ids:
query = query.filter(~HuyaTask.batch_id.in_(list(active_batch_ids)))
# active_batch_ids is None 且未指定 batch_id:清理全部匹配状态
tasks = query.all()