mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Update packages/rss-handler/src/redis.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
23014444f0
commit
261f80a3d5
1 changed files with 11 additions and 2 deletions
|
|
@ -2,8 +2,17 @@ import { Redis } from 'ioredis'
|
|||
|
||||
export const createRedisClient = (url?: string, cert?: string) => {
|
||||
if (!url) {
|
||||
console.log('No Redis URL provided, Redis client not created')
|
||||
return null
|
||||
console.log('No Redis URL provided, returning a dummy Redis client')
|
||||
return {
|
||||
on: () => {},
|
||||
off: () => {},
|
||||
quit: async () => {},
|
||||
disconnect: () => {},
|
||||
get: async () => null,
|
||||
set: async () => 'OK',
|
||||
del: async () => 0,
|
||||
// Add other Redis methods as needed, all no-op or returning safe defaults
|
||||
} as unknown as Redis
|
||||
}
|
||||
|
||||
return new Redis(url, {
|
||||
|
|
|
|||
Loading…
Reference in a new issue