Merge pull request #2419 from omnivore-app/fix/redis

get the redis connection info from env
This commit is contained in:
Hongbo Wu 2023-06-23 14:32:24 +08:00 committed by GitHub
commit f94c6317ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,13 +32,13 @@ export class NitterHandler extends ContentHandler {
URL_MATCH =
/((twitter\.com)|(nitter\.net))\/(?:#!\/)?(\w+)\/status(?:es)?\/(\d+)(?:\/.*)?/
INSTANCES = [
{ value: 'https://nitter.1d4.us', score: 0 },
{ value: 'https://nitter.moomoo.me', score: 0 },
{ value: 'https://nitter.net', score: 1 }, // the official instance
{ value: 'https://nitter.lacontrevoie.fr', score: 2 },
{ value: 'https://nitter.kavin.rocks', score: 3 },
{ value: 'https://nitter.it', score: 4 },
{ value: 'https://notabird.site', score: 4 },
{ value: 'https://singapore.unofficialbird.com', score: 5 },
{ value: 'nitter.fly.dev', score: 6 },
{ value: 'https://nitter.fly.dev', score: 6 },
]
REDIS_KEY = 'nitter-instances'
@ -173,7 +173,10 @@ export class NitterHandler extends ContentHandler {
}
}
const redisClient = await createRedisClient()
const redisClient = await createRedisClient(
process.env.REDIS_URL,
process.env.REDIS_CERT
)
try {
const tweets: Tweet[] = []