summaryrefslogtreecommitdiff
path: root/ext/kv/01_db.ts
diff options
context:
space:
mode:
authorIgor Zinkovsky <igor@deno.com>2023-09-22 09:40:35 -0700
committerGitHub <noreply@github.com>2023-09-22 09:40:35 -0700
commit035df857324f2540e051938adc5d9016f715a366 (patch)
tree548c9021ab12536f2dd99bb5eef20268903cf109 /ext/kv/01_db.ts
parent15cfb675512db5723f7deee9965390f038dc1c41 (diff)
feat(kv_queues): increase max queue delay to 30 days (#20626)
Diffstat (limited to 'ext/kv/01_db.ts')
-rw-r--r--ext/kv/01_db.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/kv/01_db.ts b/ext/kv/01_db.ts
index a1015d55d..e934a3b6d 100644
--- a/ext/kv/01_db.ts
+++ b/ext/kv/01_db.ts
@@ -26,14 +26,14 @@ async function openKv(path: string) {
return new Kv(rid, kvSymbol);
}
-const millisecondsInOneWeek = 7 * 24 * 60 * 60 * 1000;
+const maxQueueDelay = 30 * 24 * 60 * 60 * 1000;
function validateQueueDelay(delay: number) {
if (delay < 0) {
throw new TypeError("delay cannot be negative");
}
- if (delay > millisecondsInOneWeek) {
- throw new TypeError("delay cannot be greater than one week");
+ if (delay > maxQueueDelay) {
+ throw new TypeError("delay cannot be greater than 30 days");
}
if (isNaN(delay)) {
throw new TypeError("delay cannot be NaN");