Commit 1d492ec 1 parent 0dd001c commit 1d492ec Copy full SHA for 1d492ec
File tree 1 file changed +3
-1
lines changed
core/src/main/kotlin/de/otto/babbage/core/status
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ import de.otto.babbage.core.status.indicators.Status.*
7
7
import de.otto.babbage.core.status.indicators.StatusDetail
8
8
import de.otto.babbage.core.status.indicators.StatusDetailIndicator
9
9
import de.otto.babbage.core.status.version.GitVersionProvider
10
+ import kotlinx.coroutines.Dispatchers
11
+ import kotlinx.coroutines.withContext
10
12
import org.springframework.beans.factory.annotation.Autowired
11
13
import org.springframework.beans.factory.annotation.Value
12
14
import org.springframework.http.MediaType
@@ -36,7 +38,7 @@ class StatusController(
36
38
@ResponseBody
37
39
suspend fun statusJson (): StatusData {
38
40
val indicators = statusDetailIndicators.groupBy { it.getGroup() }
39
- .map { it.key to it.value.flatMap { indicator -> indicator.getDetails() } }
41
+ .map { it.key to it.value.flatMap { indicator -> withContext( Dispatchers . IO ) { indicator.getDetails() } } }
40
42
.toMap()
41
43
return StatusData (
42
44
application = Application (
You can’t perform that action at this time.
0 commit comments