Skip to content

Commit ac8ebc1

Browse files
committed
fix(email): restore closing brace dropped by suggestion-apply in EmailOutboxQueries
The 'Apply suggestions from code review' commit added the batchSize guard but dropped the EmailOutboxQueries class's closing brace, breaking the build (CS1513: } expected). Restore it and fix the method indentation.
1 parent f1ebee0 commit ac8ebc1

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

Common/OpenShockDb/EmailOutboxQueries.cs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,18 @@ public static class EmailOutboxQueries
1919
/// capped at <paramref name="batchSize"/>, locked with <c>FOR UPDATE SKIP LOCKED</c> so concurrent
2020
/// runs take disjoint batches. Run it inside an explicit transaction to hold the locks for the claim.
2121
/// </summary>
22-
public static IQueryable<EmailOutboxMessage> DueForDelivery(this DbSet<EmailOutboxMessage> outbox, int batchSize)
23-
{
24-
if (batchSize <= 0) throw new ArgumentOutOfRangeException(nameof(batchSize));
22+
public static IQueryable<EmailOutboxMessage> DueForDelivery(this DbSet<EmailOutboxMessage> outbox, int batchSize)
23+
{
24+
if (batchSize <= 0) throw new ArgumentOutOfRangeException(nameof(batchSize));
2525

26-
return outbox.FromSql(
27-
$"""
28-
SELECT * FROM email_outbox
29-
WHERE next_attempt_at <= now()
30-
AND (status = {EmailStatus.Pending} OR status = {EmailStatus.Sending})
31-
ORDER BY next_attempt_at
32-
LIMIT {batchSize}
33-
FOR UPDATE SKIP LOCKED
34-
""");
26+
return outbox.FromSql(
27+
$"""
28+
SELECT * FROM email_outbox
29+
WHERE next_attempt_at <= now()
30+
AND (status = {EmailStatus.Pending} OR status = {EmailStatus.Sending})
31+
ORDER BY next_attempt_at
32+
LIMIT {batchSize}
33+
FOR UPDATE SKIP LOCKED
34+
""");
35+
}
3536
}

0 commit comments

Comments
 (0)