diff --git a/packages/shared/lib/queue.js b/packages/shared/lib/queue.js index 3f99263..ce7d8d7 100644 --- a/packages/shared/lib/queue.js +++ b/packages/shared/lib/queue.js @@ -78,7 +78,8 @@ export class Queue { from queue_messages where queue_name = ? and vt <= ? order by msg_id - limit ?`, + limit ? + for update skip locked`, [this.name, nowIso, qty], );