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.
This commit is contained in:
@@ -875,8 +875,7 @@ export class MigrationManager {
|
||||
return;
|
||||
}
|
||||
|
||||
await MigrationManager.getParallelSourceQueue()(() =>
|
||||
MigrationManager.getOrCreateSourceQueue(entry.sourceId)(() => {
|
||||
await MigrationManager.getParallelSourceQueue()(() => {
|
||||
assertIsDefined(entry.selectedMatchSourceId);
|
||||
|
||||
return MigrationManager.getOrCreateSourceQueue(entry.selectedMatchSourceId)(async () => {
|
||||
@@ -887,8 +886,7 @@ export class MigrationManager {
|
||||
assertIsDefined(entry.selectedMatchMangaId);
|
||||
await MangaMigration.migrate(mangaId, entry.selectedMatchMangaId, options);
|
||||
});
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
MigrationManager.updateState((draft) => {
|
||||
draft.entries[mangaId].status = MigrationEntryStatus.MIGRATION_COMPLETE;
|
||||
|
||||
Reference in New Issue
Block a user