完成 Ruff 全量清理
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user