Skip to content

Commit

Permalink
Dont call elastic search if there no team to index
Browse files Browse the repository at this point in the history
  • Loading branch information
lenguyenthanh committed Jul 2, 2024
1 parent 2e4d745 commit b8e4139
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/ingestor/src/main/scala/ingestor.team.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ object TeamIngestor:
.storeBulk(index, sources)
.handleErrorWith: e =>
Logger[IO].error(e)(s"Failed to index teams: ${docs.map(_.id).mkString(", ")}")
.whenA(sources.nonEmpty)
*> info"Indexed ${sources.size} teams"

private def saveLastIndexedTimestamp(time: Instant): IO[Unit] =
Expand Down

0 comments on commit b8e4139

Please sign in to comment.