Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/beige-apples-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"wrangler": patch
---

Update default Queues message retention period and fix delivery delay maximum

The default message retention period for `wrangler queues create` has been updated from 345600 seconds (4 days) to 72000 seconds (20 hours) to align with the Queues free tier limits. The help text now clarifies that the retention period must be between 60 and 86400 seconds on the free tier, or between 60 and 1209600 seconds on paid plans.

Additionally, the maximum delivery delay value in the help text has been corrected from 42300 to 43200 seconds (12 hours).
10 changes: 5 additions & 5 deletions packages/wrangler/src/__tests__/queues/queues.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ describe("wrangler", () => {
queueSettings.delivery_delay = 0;
}
if (queueSettings?.message_retention_period === undefined) {
queueSettings.message_retention_period = 345600;
queueSettings.message_retention_period = 72000;
}

msw.use(
Expand Down Expand Up @@ -252,8 +252,8 @@ describe("wrangler", () => {
-v, --version Show version number [boolean]

OPTIONS
--delivery-delay-secs How long a published message should be delayed for, in seconds. Must be between 0 and 42300 [number] [default: 0]
--message-retention-period-secs How long to retain a message in the queue, in seconds. Must be between 60 and 1209600 [number] [default: 345600]"
--delivery-delay-secs How long a published message should be delayed for, in seconds. Must be between 0 and 43200 [number] [default: 0]
--message-retention-period-secs How long to retain a message in the queue, in seconds. Must be between 60 and 86400 if on free tier, otherwise must be between 60 and 1209600 [number] [default: 72000]"
`);
});
describe.each(["wrangler.json", "wrangler.toml"])("%s", (configPath) => {
Expand Down Expand Up @@ -476,8 +476,8 @@ describe("wrangler", () => {
-v, --version Show version number [boolean]

OPTIONS
--delivery-delay-secs How long a published message should be delayed for, in seconds. Must be between 0 and 42300 [number]
--message-retention-period-secs How long to retain a message in the queue, in seconds. Must be between 60 and 1209600 [number]"
--delivery-delay-secs How long a published message should be delayed for, in seconds. Must be between 0 and 43200 [number]
--message-retention-period-secs How long to retain a message in the queue, in seconds. Must be between 60 and 86400 if on free tier, otherwise must be between 60 and 1209600 [number]"
`);
});

Expand Down
6 changes: 3 additions & 3 deletions packages/wrangler/src/queues/cli/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ export const queuesCreateCommand = createCommand({
"delivery-delay-secs": {
type: "number",
describe:
"How long a published message should be delayed for, in seconds. Must be between 0 and 42300",
"How long a published message should be delayed for, in seconds. Must be between 0 and 43200",
default: 0,
},
"message-retention-period-secs": {
type: "number",
describe:
"How long to retain a message in the queue, in seconds. Must be between 60 and 1209600",
default: 345600,
"How long to retain a message in the queue, in seconds. Must be between 60 and 86400 if on free tier, otherwise must be between 60 and 1209600",
default: 72000,
},
},
positionalArgs: ["name"],
Expand Down
4 changes: 2 additions & 2 deletions packages/wrangler/src/queues/cli/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ export const queuesUpdateCommand = createCommand({
"delivery-delay-secs": {
type: "number",
describe:
"How long a published message should be delayed for, in seconds. Must be between 0 and 42300",
"How long a published message should be delayed for, in seconds. Must be between 0 and 43200",
},
"message-retention-period-secs": {
type: "number",
describe:
"How long to retain a message in the queue, in seconds. Must be between 60 and 1209600",
"How long to retain a message in the queue, in seconds. Must be between 60 and 86400 if on free tier, otherwise must be between 60 and 1209600",
},
},
positionalArgs: ["name"],
Expand Down
Loading