Browse Source
Bugfix/fix Redis cache health check (#4748)
* Fix Redis cache health check
pull/4749/head
Thomas Kaul
1 month ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
2 deletions
-
apps/api/src/app/redis-cache/redis-cache.service.ts
|
|
@ -80,7 +80,7 @@ export class RedisCacheService { |
|
|
|
|
|
|
|
public async isHealthy() { |
|
|
|
try { |
|
|
|
const isHealthy = await Promise.race([ |
|
|
|
await Promise.race([ |
|
|
|
this.getKeys(), |
|
|
|
new Promise((_, reject) => |
|
|
|
setTimeout( |
|
|
@ -90,7 +90,7 @@ export class RedisCacheService { |
|
|
|
) |
|
|
|
]); |
|
|
|
|
|
|
|
return isHealthy === 'PONG'; |
|
|
|
return true; |
|
|
|
} catch (error) { |
|
|
|
return false; |
|
|
|
} |
|
|
|