Skip to content

Commit 6d5065b

Browse files
committed
Sort by request tag when dequeuing jobs
To ensure that jobs from the same request are batched together.
1 parent bf2ee34 commit 6d5065b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

database/src/pool/postgres.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,6 +1803,7 @@ where
18031803
WHEN status = $1 THEN 1
18041804
ELSE 2
18051805
END,
1806+
request_tag,
18061807
created_at
18071808
LIMIT 1
18081809
FOR UPDATE SKIP LOCKED

0 commit comments

Comments
 (0)