Skip to content

Commit

Permalink
remove infinite await
Browse files Browse the repository at this point in the history
  • Loading branch information
kpodsiad committed Oct 19, 2022
1 parent b1bfccb commit 65318a5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import java.nio.file.NoSuchFileException
import java.nio.file.Path
import java.util.Optional
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.TimeUnit

import scala.collection.mutable
import scala.concurrent.Await
Expand Down Expand Up @@ -159,7 +160,10 @@ object ResultsCache {
logger: Logger
): ResultsCache = {
val handle = loadAsync(build, cwd, cleanOrphanedInternalDirs, logger)
Await.result(handle.runAsync(ExecutionContext.ioScheduler), Duration.Inf)
Await.result(
handle.runAsync(ExecutionContext.ioScheduler),
Duration.apply(30, TimeUnit.SECONDS)
)
}

def loadAsync(
Expand Down

0 comments on commit 65318a5

Please sign in to comment.