mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
fix(nodes): fix cancel_by_batch_ids result count
This commit is contained in:
@@ -409,10 +409,11 @@ class SqliteSessionQueue(SessionQueueBase):
|
||||
try:
|
||||
self._lock.acquire()
|
||||
placeholders = ", ".join(["?" for _ in batch_ids])
|
||||
where = f"WHERE batch_id IN ({placeholders}) AND status != 'canceled' AND status != 'completed'"
|
||||
self._cursor.execute(
|
||||
f"""--sql
|
||||
SELECT COUNT(*) FROM session_queue
|
||||
WHERE batch_id IN ({placeholders});
|
||||
{where};
|
||||
""",
|
||||
batch_ids,
|
||||
)
|
||||
@@ -421,7 +422,7 @@ class SqliteSessionQueue(SessionQueueBase):
|
||||
f"""--sql
|
||||
UPDATE session_queue
|
||||
SET status = 'canceled'
|
||||
WHERE batch_id IN ({placeholders}) AND status != 'canceled' AND status != 'completed';
|
||||
{where};
|
||||
""",
|
||||
batch_ids,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user