change flag to integration-testing and update notification service construction

This commit is contained in:
2025-02-19 11:15:11 -08:00
parent f1b9fb6824
commit 58bb8a1c32

View File

@@ -21,16 +21,17 @@ async function main() {
}); });
const repository = new UnoptimizedInMemoryRepository(); const repository = new UnoptimizedInMemoryRepository();
if (process.argv.length > 2 && process.argv[2] == "mocks") { let notificationService: NotificationService;
if (process.argv.length > 2 && process.argv[2] == "integration-testing") {
await loadTestData(repository); await loadTestData(repository);
notificationService = new NotificationService(repository, false);
} else { } else {
const repositoryDataUpdater = new TimedApiBasedRepositoryLoader( const repositoryDataUpdater = new TimedApiBasedRepositoryLoader(
repository repository
); );
await repositoryDataUpdater.start(); await repositoryDataUpdater.start();
notificationService = new NotificationService(repository);
} }
const notificationService = new NotificationService(repository);
notificationService.reloadAPNsTokenIfTimePassed(); notificationService.reloadAPNsTokenIfTimePassed();
const { url } = await startStandaloneServer(server, { const { url } = await startStandaloneServer(server, {