From f89364bca5968f4d4ac41ca8af11677657a5612f Mon Sep 17 00:00:00 2001 From: bryantgillespie Date: Mon, 22 Apr 2024 12:55:06 -0400 Subject: [PATCH 1/2] dial back request intervals --- plugins/directus.ts | 2 +- plugins/tv.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/directus.ts b/plugins/directus.ts index 54d83ff2..0f54921e 100644 --- a/plugins/directus.ts +++ b/plugins/directus.ts @@ -5,7 +5,7 @@ import type { Schema } from '~/types/schema'; const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); -const queue = new Queue({ intervalCap: 15, interval: 500, carryoverConcurrencyCount: true }); +const queue = new Queue({ intervalCap: 15, interval: 1000, carryoverConcurrencyCount: true }); export default defineNuxtPlugin((nuxtApp) => { const route = useRoute(); diff --git a/plugins/tv.ts b/plugins/tv.ts index c148b41e..523fd429 100644 --- a/plugins/tv.ts +++ b/plugins/tv.ts @@ -5,7 +5,7 @@ import type { Schema } from '~/types/schema'; const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); -const queue = new Queue({ intervalCap: 15, interval: 500, carryoverConcurrencyCount: true }); +const queue = new Queue({ intervalCap: 15, interval: 1000, carryoverConcurrencyCount: true }); export default defineNuxtPlugin((nuxtApp) => { const route = useRoute(); From 3166a6efd4fcd92e004a9c973f7238a9a9c3bcdb Mon Sep 17 00:00:00 2001 From: bryantgillespie Date: Tue, 23 Apr 2024 15:16:55 -0400 Subject: [PATCH 2/2] limit concurrency --- plugins/directus.ts | 2 +- plugins/tv.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/directus.ts b/plugins/directus.ts index 0f54921e..d5d604bd 100644 --- a/plugins/directus.ts +++ b/plugins/directus.ts @@ -5,7 +5,7 @@ import type { Schema } from '~/types/schema'; const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); -const queue = new Queue({ intervalCap: 15, interval: 1000, carryoverConcurrencyCount: true }); +const queue = new Queue({ intervalCap: 10, interval: 1000, carryoverConcurrencyCount: true }); export default defineNuxtPlugin((nuxtApp) => { const route = useRoute(); diff --git a/plugins/tv.ts b/plugins/tv.ts index 523fd429..31787733 100644 --- a/plugins/tv.ts +++ b/plugins/tv.ts @@ -5,7 +5,7 @@ import type { Schema } from '~/types/schema'; const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); -const queue = new Queue({ intervalCap: 15, interval: 1000, carryoverConcurrencyCount: true }); +const queue = new Queue({ intervalCap: 10, interval: 1000, carryoverConcurrencyCount: true }); export default defineNuxtPlugin((nuxtApp) => { const route = useRoute();