[FA-misc] Fix issues with novel imports
This commit is contained in:
@@ -57,9 +57,10 @@ public class NovelImportSaga : MassTransitStateMachine<NovelImportSagaState>
|
||||
{
|
||||
ctx.Saga.NovelId = ctx.Message.NovelId;
|
||||
ctx.Saga.ExpectedChapters = ctx.Message.ChaptersPendingPull;
|
||||
ctx.Saga.ExpectedImages += ctx.Message.CoverImageQueued ? 1 : 0;
|
||||
})
|
||||
.IfElse(
|
||||
ctx => ctx.Saga.ExpectedChapters == 0,
|
||||
ctx => ctx.Saga.ExpectedChapters == 0 && !ctx.Message.CoverImageQueued,
|
||||
thenBinder => thenBinder
|
||||
.Then(ctx => ctx.Saga.CompletedAt = _clock.GetCurrentInstant())
|
||||
.TransitionTo(Completed)
|
||||
|
||||
Reference in New Issue
Block a user