Skip to content

Commit

Permalink
Fix network manager not removing old instances
Browse files Browse the repository at this point in the history
  • Loading branch information
NovaFox161 committed Mar 23, 2024
1 parent 4e37215 commit 5a2af29
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -98,10 +98,10 @@ class NetworkManager(
Flux.interval(Duration.ofMinutes(1))
.flatMap { updateAndReturnStatus() } //Update local status every minute
.flatMap {
val bot = Flux.from<BotInstanceData> { status.botStatus }
val bot = Flux.fromIterable(status.botStatus)
.filter { Instant.now().isAfter(it.instanceData.lastHeartbeat.plus(5, ChronoUnit.MINUTES)) }
.flatMap(this::doRestartBot)
val cam = Flux.from<InstanceData> { status.camStatus }
val cam = Flux.fromIterable(status.camStatus)
.filter { Instant.now().isAfter(it.lastHeartbeat.plus(5, ChronoUnit.MINUTES)) }
.flatMap(this::doRestartCam)

Expand Down

0 comments on commit 5a2af29

Please sign in to comment.