Possible working ETL
This commit is contained in:
@@ -5,30 +5,19 @@
|
||||
import { Pool } from 'pg';
|
||||
import pool from '../../core/config/database';
|
||||
import { cacheService } from '../../core/config/redis';
|
||||
import { VINDecodeService } from './domain/vin-decode.service';
|
||||
import { PlatformCacheService } from './domain/platform-cache.service';
|
||||
import { VehicleDataService } from './domain/vehicle-data.service';
|
||||
|
||||
export { platformRoutes } from './api/platform.routes';
|
||||
export { PlatformController } from './api/platform.controller';
|
||||
export { VehicleDataService } from './domain/vehicle-data.service';
|
||||
export { VINDecodeService } from './domain/vin-decode.service';
|
||||
export { PlatformCacheService } from './domain/platform-cache.service';
|
||||
export * from './models/requests';
|
||||
export * from './models/responses';
|
||||
|
||||
// Singleton VIN decode service for use by other features
|
||||
let vinDecodeServiceInstance: VINDecodeService | null = null;
|
||||
// Singleton vehicle data service for use by other features
|
||||
let vehicleDataServiceInstance: VehicleDataService | null = null;
|
||||
|
||||
export function getVINDecodeService(): VINDecodeService {
|
||||
if (!vinDecodeServiceInstance) {
|
||||
const platformCache = new PlatformCacheService(cacheService);
|
||||
vinDecodeServiceInstance = new VINDecodeService(platformCache);
|
||||
}
|
||||
return vinDecodeServiceInstance;
|
||||
}
|
||||
|
||||
export function getVehicleDataService(): VehicleDataService {
|
||||
if (!vehicleDataServiceInstance) {
|
||||
const platformCache = new PlatformCacheService(cacheService);
|
||||
|
||||
Reference in New Issue
Block a user