feat: 任务失败后继续执行下一条 (#170)
This commit is contained in:
@@ -379,7 +379,7 @@ class TaskRepository:
|
||||
try:
|
||||
row = connection.execute(
|
||||
"SELECT * FROM pdd_tasks"
|
||||
" WHERE task_type = 'collect' AND status IN ('claimed', 'retry_wait')"
|
||||
" WHERE task_type = 'collect' AND status = 'claimed'"
|
||||
" ORDER BY received_at ASC, id ASC LIMIT 1"
|
||||
).fetchone()
|
||||
finally:
|
||||
@@ -456,15 +456,11 @@ class TaskRepository:
|
||||
|
||||
if include_purchase:
|
||||
where = (
|
||||
"((task_type = 'collect'"
|
||||
" AND status IN ('claimed', 'retry_wait'))"
|
||||
"((task_type = 'collect' AND status = 'claimed')"
|
||||
" OR (task_type = 'purchase' AND status = 'claimed'))"
|
||||
)
|
||||
else:
|
||||
where = (
|
||||
"task_type = 'collect'"
|
||||
" AND status IN ('claimed', 'retry_wait')"
|
||||
)
|
||||
where = "task_type = 'collect' AND status = 'claimed'"
|
||||
connection = open_database(self._db_path)
|
||||
try:
|
||||
row = connection.execute(
|
||||
|
||||
Reference in New Issue
Block a user