From f659f3d9a53b511eac6904134d0b72a0d96fc63d Mon Sep 17 00:00:00 2001 From: Thanh Le Date: Sat, 25 Nov 2023 13:11:44 +0100 Subject: [PATCH] Avoid naming things when we can avoid them --- app/src/main/scala/App.scala | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/scala/App.scala b/app/src/main/scala/App.scala index ffc095c..d7a9338 100644 --- a/app/src/main/scala/App.scala +++ b/app/src/main/scala/App.scala @@ -29,11 +29,9 @@ class FishnetApp(res: AppResources, config: AppConfig)(using Logger[IO]): lilaClient <- Resource.pure(LilaClient(res.redisPubsub)) monitor = Monitor.apply executor <- Resource.eval(Executor.instance(lilaClient, monitor)) - subscriberJob = RedisSubscriberJob(executor, res.redisPubsub) - cleaningJob = WorkCleaningJob(executor) - httpApi = HttpApi(executor, HealthCheck()) + httpApi = HttpApi(executor, HealthCheck()) server <- MkHttpServer.apply.newEmber(config.server, httpApi.httpApp) - _ <- subscriberJob.run().background - _ <- cleaningJob.run().background + _ <- RedisSubscriberJob(executor, res.redisPubsub).run().background + _ <- WorkCleaningJob(executor).run().background _ <- Resource.eval(Logger[IO].info(s"Starting server on ${config.server.host}:${config.server.port}")) yield ()