trackers needs to be singleton, loggers should. be too

This commit is contained in:
iPromKnight
2024-02-07 11:22:32 +00:00
committed by iPromKnight
parent 5ebb9b4ae8
commit 0f3e20eef3
3 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View File

@@ -404,3 +404,4 @@ FodyWeavers.xsd
*.sln.iml
dist/
**/localdev.compose.yml

View File

@@ -5,7 +5,7 @@
"scripts": {
"build": "node esbuild.js",
"dev": "tsx watch --ignore node_modules src/main.ts | pino-pretty",
"start": "node dist/index.cjs",
"start": "node dist/main.cjs",
"lint": "npx eslint ./src --ext .ts,.js"
},
"license": "MIT",

View File

@@ -30,14 +30,14 @@ const serviceContainer = new Container();
serviceContainer.bind<ICompositionalRoot>(IocTypes.ICompositionalRoot).to(CompositionalRoot).inSingletonScope();
serviceContainer.bind<ICacheService>(IocTypes.ICacheService).to(CacheService).inSingletonScope();
serviceContainer.bind<ILoggingService>(IocTypes.ILoggingService).to(LoggingService).inSingletonScope();
serviceContainer.bind<ITrackerService>(IocTypes.ITrackerService).to(TrackerService).inSingletonScope();
serviceContainer.bind<ITorrentFileService>(IocTypes.ITorrentFileService).to(TorrentFileService);
serviceContainer.bind<ITorrentProcessingService>(IocTypes.ITorrentProcessingService).to(TorrentProcessingService);
serviceContainer.bind<ITorrentSubtitleService>(IocTypes.ITorrentSubtitleService).to(TorrentSubtitleService);
serviceContainer.bind<ITorrentEntriesService>(IocTypes.ITorrentEntriesService).to(TorrentEntriesService);
serviceContainer.bind<ITorrentDownloadService>(IocTypes.ITorrentDownloadService).to(TorrentDownloadService);
serviceContainer.bind<ILoggingService>(IocTypes.ILoggingService).to(LoggingService);
serviceContainer.bind<IMetadataService>(IocTypes.IMetadataService).to(MetadataService);
serviceContainer.bind<ITrackerService>(IocTypes.ITrackerService).to(TrackerService);
serviceContainer.bind<IDatabaseRepository>(IocTypes.IDatabaseRepository).to(DatabaseRepository);
serviceContainer.bind<IProcessTorrentsJob>(IocTypes.IProcessTorrentsJob).to(ProcessTorrentsJob);