Some more logging

This commit is contained in:
Jackson Harper
2024-01-17 10:21:19 +08:00
parent 0936942378
commit ec765c0f5c

View File

@ -75,6 +75,10 @@ const feedFetchFailedRedisKey = (feedUrl: string) =>
const isFeedBlocked = async (feedUrl: string, redisClient: Redis) => {
const key = feedFetchFailedRedisKey(feedUrl)
try {
console.log('checking if feed is blocked:', {
redisClient,
status: redisClient.status,
})
const result = await redisClient.get(key)
// if the feed has failed to fetch more than certain times, block it
const maxFailures = parseInt(process.env.MAX_FEED_FETCH_FAILURES ?? '10')