diff --git a/modules/ingestor/src/main/scala/mongo.chapter.scala b/modules/ingestor/src/main/scala/mongo.chapter.scala index bd90dad..1a05e78 100644 --- a/modules/ingestor/src/main/scala/mongo.chapter.scala +++ b/modules/ingestor/src/main/scala/mongo.chapter.scala @@ -110,6 +110,9 @@ object ChapterRepo: def byStudyIds(ids: List[String]): IO[Map[String, StudyData]] = coll .aggregateWithCodec[StudyData](Query.aggregate(ids)) - .all // .flatTap(docs => Logger[IO].debug(s"Received $docs chapters")) + .stream + .compile + .toList + .flatTap(docs => Logger[IO].debug(s"Received $docs chapters")) .map(_.map(x => x._id -> x).toMap)