Skip to content

Commit 1709e9f

Browse files
committed
Update ModelJob.condition to check startupMutex lock status in ModelSupervisor
1 parent dcc58cd commit 1709e9f

File tree

1 file changed

+1
-1
lines changed
  • krescent-core/src/main/kotlin/dev/helight/krescent/supervisor

1 file changed

+1
-1
lines changed

krescent-core/src/main/kotlin/dev/helight/krescent/supervisor/ModelJob.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package dev.helight.krescent.supervisor
22

33
interface ModelJob {
4-
suspend fun condition(supervisor: ModelSupervisor) = true
4+
suspend fun condition(supervisor: ModelSupervisor) = !supervisor.startupMutex.isLocked
55
suspend fun run(supervisor: ModelSupervisor)
66
suspend fun onBefore(supervisor: ModelSupervisor) {}
77
suspend fun onFailed(supervisor: ModelSupervisor, error: Throwable) {}

0 commit comments

Comments
 (0)