Browse Source

fix(core): Job update doesn't emit if progress didn't change (#1550)

Alexander Shitikov 3 years ago
parent
commit
2ce444f3e8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/core/src/job-queue/subscribable-job.ts

+ 1 - 1
packages/core/src/job-queue/subscribable-job.ts

@@ -81,7 +81,7 @@ export class SubscribableJob<T extends JobData<T> = any> extends Job<T> {
                     return strategy.findOne(id);
                 }),
                 filter(notNullOrUndefined),
-                distinctUntilChanged((a, b) => a?.progress === b?.progress || a?.state === b?.state),
+                distinctUntilChanged((a, b) => a?.progress === b?.progress && a?.state === b?.state),
                 takeWhile(
                     job =>
                         job?.state !== JobState.FAILED &&