Skip to content

Commit 88b74a2

Browse files
maheshwaripOxyjun
andauthored
Apply suggestions from code review
Co-authored-by: Jun Lee <[email protected]>
1 parent d434926 commit 88b74a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/content/compatibility-flags/queue-consumer-no-wait-waituntil.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ enable_flag: "queue_consumer_no_wait_for_wait_until"
1212

1313
By default, [Queues](/queues/) Consumer Workers acknowledge messages only after promises passed to [`ctx.waitUntil()`](/workers/runtime-apis/context) have resolved. This behavior can cause queue consumers which utilize `ctx.waitUntil()` to process messages slowly. The default behavior is documented in the [Queues Consumer Configuration Guide](/queues/configuration/javascript-apis#consumer).
1414

15-
This Consumer Worker is an example of a Worker which utilizes `ctx.waitUntil()`. Under the default behavior, this consumer Worker will only acknowledge a batch of after the sleep function has resolved.
15+
This Consumer Worker is an example of a Worker which utilizes `ctx.waitUntil()`. Under the default behavior, this consumer Worker will only acknowledge a batch of messages after the sleep function has resolved.
1616
```js
1717
export default {
1818
async fetch(request, env, ctx) {
@@ -33,6 +33,6 @@ function sleep(ms) {
3333
}
3434
```
3535

36-
If the `queue_consumer_no_wait_for_wait_until` flag is enabled, Queue consumers will no longer wait for promises passed to `ctx.waitUntil()` to resolve before acknowledging messages. This can improve the performance of queue consumers which utilize `ctx.waitUntil()`. With the flag enabled, in the above example, the consumer Worker will acknowledge the batch without waiting for the sleep function to resolve.
36+
If the `queue_consumer_no_wait_for_wait_until` flag is enabled, Queues consumers will no longer wait for promises passed to `ctx.waitUntil()` to resolve before acknowledging messages. This can improve the performance of queue consumers which utilize `ctx.waitUntil()`. With the flag enabled, in the above example, the consumer Worker will acknowledge the batch without waiting for the sleep function to resolve.
3737

38-
Using this flag will not affect the behavior of `ctx.waitUntil()`. `ctx.waitUntil()` will continue to extend the lifetime of your consumer Worker, to continue to work even after the batch of messages has been acknowledged.
38+
Using this flag will not affect the behavior of `ctx.waitUntil()`. `ctx.waitUntil()` will continue to extend the lifetime of your consumer Worker to continue to work even after the batch of messages has been acknowledged.

0 commit comments

Comments
 (0)