mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
update builder method and use in index
This commit is contained in:
@@ -39,13 +39,15 @@ export class InterchangeSystem {
|
|||||||
* classes are correctly linked, meant for use in development and production.
|
* classes are correctly linked, meant for use in development and production.
|
||||||
* @param args
|
* @param args
|
||||||
*/
|
*/
|
||||||
static build(
|
static async build(
|
||||||
args: InterchangeSystemBuilderArguments,
|
args: InterchangeSystemBuilderArguments,
|
||||||
) {
|
) {
|
||||||
const shuttleRepository = new UnoptimizedInMemoryShuttleRepository();
|
const shuttleRepository = new UnoptimizedInMemoryShuttleRepository();
|
||||||
const shuttleDataLoader = new TimedApiBasedShuttleRepositoryLoader(args.passioSystemId, shuttleRepository);
|
const shuttleDataLoader = new TimedApiBasedShuttleRepositoryLoader(args.passioSystemId, shuttleRepository);
|
||||||
|
await shuttleDataLoader.start();
|
||||||
|
|
||||||
const notificationRepository = new RedisNotificationRepository();
|
const notificationRepository = new RedisNotificationRepository();
|
||||||
|
await notificationRepository.connect();
|
||||||
const notificationScheduler = new ETANotificationScheduler(
|
const notificationScheduler = new ETANotificationScheduler(
|
||||||
shuttleRepository,
|
shuttleRepository,
|
||||||
notificationRepository,
|
notificationRepository,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ async function main() {
|
|||||||
} else {
|
} else {
|
||||||
systems = await Promise.all(supportedSystems.map(
|
systems = await Promise.all(supportedSystems.map(
|
||||||
async (systemArguments) => {
|
async (systemArguments) => {
|
||||||
return InterchangeSystem.buildForTesting(systemArguments);
|
return await InterchangeSystem.build(systemArguments);
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user