a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

use env vars manually to instantiate redis

+9 -2
+9 -2
src/atproto-oauth.ts
··· 19 19 ]) 20 20 : undefined; 21 21 let requestLock: RuntimeLock | undefined; 22 - if (process.env.NODE_ENV === "production") { 23 - const redis = Redis.fromEnv(); 22 + if ( 23 + process.env.NODE_ENV === "production" && 24 + process.env.KV_REST_API_URL && 25 + process.env.KV_REST_API_TOKEN 26 + ) { 27 + const redis = new Redis({ 28 + url: process.env.KV_REST_API_URL, 29 + token: process.env.KV_REST_API_TOKEN, 30 + }); 24 31 const redlock = new Redlock([redis]); 25 32 requestLock = async (key, fn) => { 26 33 // 30 seconds should be enough. Since we will be using one lock per user id