unified config
This commit is contained in:
parent
e7c0fe2798
commit
3877902ff4
13 changed files with 856 additions and 476 deletions
|
|
@ -11,7 +11,8 @@ export function registerCacheServices(
|
|||
container.register({
|
||||
cache: asFunction(() => {
|
||||
const { createServiceCache } = require('@stock-bot/queue');
|
||||
const serviceName = config.service?.name || 'unknown';
|
||||
// Get standardized service name from config
|
||||
const serviceName = config.service?.serviceName || config.service?.name || 'unknown';
|
||||
|
||||
// Create service-specific cache that uses the service's Redis DB
|
||||
return createServiceCache(serviceName, {
|
||||
|
|
@ -25,7 +26,7 @@ export function registerCacheServices(
|
|||
// Also provide global cache for shared data
|
||||
globalCache: asFunction(() => {
|
||||
const { createServiceCache } = require('@stock-bot/queue');
|
||||
const serviceName = config.service?.name || 'unknown';
|
||||
const serviceName = config.service?.serviceName || config.service?.name || 'unknown';
|
||||
|
||||
return createServiceCache(serviceName, {
|
||||
host: config.redis.host,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue