added proper error messaged
This commit is contained in:
parent
71f771862b
commit
8a1a28b26e
4 changed files with 90 additions and 72 deletions
|
|
@ -4,11 +4,7 @@
|
|||
*/
|
||||
|
||||
import { initializeStockConfig } from '@stock-bot/stock-config';
|
||||
import {
|
||||
ServiceApplication,
|
||||
createServiceContainerFromConfig,
|
||||
initializeServices as initializeAwilixServices,
|
||||
} from '@stock-bot/di';
|
||||
import { ServiceApplication } from '@stock-bot/di';
|
||||
import { getLogger } from '@stock-bot/logger';
|
||||
|
||||
// Local imports
|
||||
|
|
@ -58,17 +54,24 @@ const app = new ServiceApplication(
|
|||
|
||||
// Container factory function
|
||||
async function createContainer(config: any) {
|
||||
const container = createServiceContainerFromConfig(config, {
|
||||
enableQuestDB: config.database.questdb?.enabled || false,
|
||||
// Data pipeline needs all databases
|
||||
enableMongoDB: true,
|
||||
enablePostgres: true,
|
||||
enableCache: true,
|
||||
enableQueue: true,
|
||||
enableBrowser: false, // Data pipeline doesn't need browser
|
||||
enableProxy: false, // Data pipeline doesn't need proxy
|
||||
});
|
||||
await initializeAwilixServices(container);
|
||||
const { ServiceContainerBuilder } = await import('@stock-bot/di');
|
||||
const builder = new ServiceContainerBuilder();
|
||||
|
||||
const container = await builder
|
||||
.withConfig(config)
|
||||
.withOptions({
|
||||
enableQuestDB: false, // Disabled for now due to auth issues
|
||||
// Data pipeline needs all databases
|
||||
enableMongoDB: true,
|
||||
enablePostgres: true,
|
||||
enableCache: true,
|
||||
enableQueue: true,
|
||||
enableBrowser: false, // Data pipeline doesn't need browser
|
||||
enableProxy: false, // Data pipeline doesn't need proxy
|
||||
skipInitialization: false, // Let builder handle initialization
|
||||
})
|
||||
.build();
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue