@@ -4,6 +4,7 @@ import * as moment from 'moment';
44import { inject , injectable , interfaces } from 'inversify' ;
55import { TYPES } from '@vulcan-sql/core/types' ;
66import {
7+ IActivityLogger ,
78 CacheLayerInfo ,
89 ICacheLayerOptions ,
910 cacheProfileName ,
@@ -22,16 +23,19 @@ export class CacheLayerLoader implements ICacheLayerLoader {
2223 private options : ICacheLayerOptions ;
2324 private cacheStorage : DataSource ;
2425 private logger = getLogger ( { scopeName : 'CORE' } ) ;
25-
26+ private activityLoggers : IActivityLogger ;
2627 constructor (
2728 @inject ( TYPES . CacheLayerOptions ) options : CacheLayerOptions ,
2829 @inject ( TYPES . Factory_DataSource )
29- dataSourceFactory : interfaces . SimpleFactory < DataSource >
30+ dataSourceFactory : interfaces . SimpleFactory < DataSource > ,
31+ @inject ( TYPES . Extension_ActivityLogger )
32+ activityLogger : IActivityLogger
3033 ) {
3134 this . dataSourceFactory = dataSourceFactory ;
3235 this . options = options ;
3336 // prepare cache data source
3437 this . cacheStorage = this . dataSourceFactory ( cacheProfileName ) ;
38+ this . activityLoggers = activityLogger ;
3539 }
3640
3741 /**
@@ -46,6 +50,7 @@ export class CacheLayerLoader implements ICacheLayerLoader {
4650 const { cacheTableName, sql, profile, indexes, folderSubpath } = cache ;
4751 const type = this . options . type ! ;
4852 const dataSource = this . dataSourceFactory ( profile ) ;
53+ await this . activityLoggers . log ( { a : 1 } ) ;
4954
5055 // generate directory for cache file path to export
5156 // format => [folderPath]/[schema.templateSource]/[profileName]/[cacheTableName]]/[timestamp]
0 commit comments