mirror of
https://github.com/mihonapp/mihon.git
synced 2024-12-25 02:18:24 +01:00
Fix Migrator not doing work (#604)
This commit is contained in:
parent
7c6fd026a3
commit
6b3423a12b
@ -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 New Issue
Block a user