From 0717e3e6be58702c025332fad042a362500b4110 Mon Sep 17 00:00:00 2001 From: Alex Kern Date: Sat, 28 Dec 2024 21:52:14 -0800 Subject: [PATCH] Adjust renew interval and add dev script --- package.json | 3 ++- src/hooks/useUploaderChannel.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 086e04a..486e5ed 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "homepage": "https://github.com/kern/filepizza", "scripts": { "dev": "next", + "dev:redis": "docker compose up redis -d && REDIS_URL=redis://localhost:6379 next", "build": "next build", "start": "next start", "start:peerjs": "./bin/peerjs.js", @@ -83,4 +84,4 @@ "git add" ] } -} +} \ No newline at end of file diff --git a/src/hooks/useUploaderChannel.ts b/src/hooks/useUploaderChannel.ts index 5f7e8fa..5c0d7e0 100644 --- a/src/hooks/useUploaderChannel.ts +++ b/src/hooks/useUploaderChannel.ts @@ -12,7 +12,7 @@ function generateURL(slug: string): string { export function useUploaderChannel( uploaderPeerID: string, - renewInterval = 5000, + renewInterval = 60_000, ): { isLoading: boolean error: Error | null