unified config
This commit is contained in:
parent
e7c0fe2798
commit
3877902ff4
13 changed files with 856 additions and 476 deletions
|
|
@ -20,12 +20,14 @@ export function initializeStockConfig(serviceName?: 'dataIngestion' | 'dataPipel
|
|||
|
||||
// If a service name is provided, override the service port
|
||||
if (serviceName && config.services?.[serviceName]) {
|
||||
const kebabName = serviceName.replace(/([A-Z])/g, '-$1').toLowerCase().replace(/^-/, '');
|
||||
return {
|
||||
...config,
|
||||
service: {
|
||||
...config.service,
|
||||
port: config.services[serviceName].port,
|
||||
name: serviceName.replace(/([A-Z])/g, '-$1').toLowerCase() // Convert camelCase to kebab-case
|
||||
name: serviceName, // Keep original for backward compatibility
|
||||
serviceName: kebabName // Standard kebab-case name
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,17 +47,6 @@ const app = new ServiceApplication(
|
|||
},
|
||||
{
|
||||
// Custom lifecycle hooks
|
||||
onContainerReady: (container) => {
|
||||
// Override queue configuration to disable workers
|
||||
const config = container.cradle.config;
|
||||
if (config.queue) {
|
||||
config.queue.workers = 0;
|
||||
config.queue.concurrency = 0;
|
||||
config.queue.enableScheduledJobs = false;
|
||||
config.queue.delayWorkerStart = true;
|
||||
}
|
||||
return container;
|
||||
},
|
||||
onStarted: (port) => {
|
||||
const logger = getLogger('web-api');
|
||||
logger.info('Web API service startup initiated with ServiceApplication framework');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue