mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 20:31:02 -05:00
Fix Migrator not doing work (#604)
This commit is contained in:
parent
7c6fd026a3
commit
6b3423a12b
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ package mihon.core.migration
|
|||
|
||||
import kotlinx.coroutines.CompletableDeferred
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.CoroutineStart
|
||||
import kotlinx.coroutines.Deferred
|
||||
import kotlinx.coroutines.async
|
||||
import tachiyomi.core.common.util.system.logcat
|
||||
|
@ -17,7 +18,7 @@ class MigrationJobFactory(
|
|||
.fold(CompletableDeferred(true)) { acc: Deferred<Boolean>, migration: Migration ->
|
||||
if (!migrationContext.dryrun) {
|
||||
logcat { "Running migration: { name = ${migration::class.simpleName}, version = ${migration.version} }" }
|
||||
async {
|
||||
async(start = CoroutineStart.UNDISPATCHED) {
|
||||
val prev = acc.await()
|
||||
migration(migrationContext) || prev
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue