fixes
This commit is contained in:
parent
32d0eaac2d
commit
9825e99540
3 changed files with 68 additions and 59 deletions
|
|
@ -120,14 +120,17 @@ async function initializeSharedResources() {
|
|||
httpClient = new HttpClient({ timeout: 10000 }, logger);
|
||||
concurrencyLimit = pLimit(PROXY_CONFIG.CONCURRENCY_LIMIT);
|
||||
|
||||
// Try to connect to cache, but don't block initialization if it fails
|
||||
try {
|
||||
// Use longer timeout for cache connection
|
||||
await cache.waitForReady(30000); // 30 seconds
|
||||
logger.info('Cache connection established');
|
||||
} catch (error) {
|
||||
logger.warn('Cache connection failed, continuing with degraded functionality:', {error});
|
||||
// Don't throw - allow the service to continue with cache fallbacks
|
||||
// Check if cache is ready, but don't block initialization
|
||||
if (cache.isReady()) {
|
||||
logger.info('Cache already ready');
|
||||
} else {
|
||||
logger.info('Cache not ready yet, tasks will use fallback mode');
|
||||
// Try to wait briefly for cache to be ready, but don't block
|
||||
cache.waitForReady(5000).then(() => {
|
||||
logger.info('Cache became ready after initialization');
|
||||
}).catch(error => {
|
||||
logger.warn('Cache connection timeout, continuing with fallback mode:', {error: error.message});
|
||||
});
|
||||
}
|
||||
|
||||
logger.info('Proxy tasks initialized');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue