This commit is contained in:
Boki 2025-06-10 14:12:24 -04:00
parent a86367bec5
commit 00b21a57d7
4 changed files with 31 additions and 21 deletions

View file

@ -115,7 +115,16 @@ async function initializeSharedResources() {
ttl: PROXY_CONFIG.CACHE_TTL,
enableMetrics: true
});
await cache.waitForReady();
try {
// Use longer timeout for cache connection
await cache.waitForReady(30000); // 30 seconds
logger.info('Cache connection established');
} catch (error) {
logger.error('Cache connection failed, continuing with degraded functionality:', error);
// Don't throw - allow the service to continue with cache fallbacks
}
httpClient = new HttpClient({ timeout: 10000 }, logger);
concurrencyLimit = pLimit(PROXY_CONFIG.CONCURRENCY_LIMIT);
logger.info('Proxy tasks initialized');

View file

@ -324,7 +324,7 @@ export class BatchProcessor {
operation: `process-${jobNamePrefix}-batch`,
payload: {
// Optimized: only store reference and metadata
payloadKey: payloadKey,
payloadKey: this.keyPrefix + payloadKey,
batchIndex,
total: totalBatches,
itemCount: batchItems.length,