From f7801de750e24722a2d95398df12205a677fcb42 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Fri, 8 May 2026 01:50:24 +0200 Subject: [PATCH] Fix bulk migration with migrating entries to their current source When migrating an entry to the same source as it already is from, the source queues got blocked, preventing any progress. Since the migration does not do any request to the source of the entry to migrate, it is not required to go through the queue for the source. --- src/features/migration/MigrationManager.ts | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/features/migration/MigrationManager.ts b/src/features/migration/MigrationManager.ts index 13ba41af..888bbdae 100644 --- a/src/features/migration/MigrationManager.ts +++ b/src/features/migration/MigrationManager.ts @@ -875,20 +875,18 @@ export class MigrationManager { return; } - await MigrationManager.getParallelSourceQueue()(() => - MigrationManager.getOrCreateSourceQueue(entry.sourceId)(() => { - assertIsDefined(entry.selectedMatchSourceId); + await MigrationManager.getParallelSourceQueue()(() => { + assertIsDefined(entry.selectedMatchSourceId); - return MigrationManager.getOrCreateSourceQueue(entry.selectedMatchSourceId)(async () => { - if (signal.aborted) { - return; - } + return MigrationManager.getOrCreateSourceQueue(entry.selectedMatchSourceId)(async () => { + if (signal.aborted) { + return; + } - assertIsDefined(entry.selectedMatchMangaId); - await MangaMigration.migrate(mangaId, entry.selectedMatchMangaId, options); - }); - }), - ); + assertIsDefined(entry.selectedMatchMangaId); + await MangaMigration.migrate(mangaId, entry.selectedMatchMangaId, options); + }); + }); MigrationManager.updateState((draft) => { draft.entries[mangaId].status = MigrationEntryStatus.MIGRATION_COMPLETE;