Skip to content

Commit

Permalink
#175 Fixed a bug that caused to exit the index method too early witho…
Browse files Browse the repository at this point in the history
…ut all issues, merge requests, and versions being persisted and thus logging a wrong number of persisted/omitted issues.
  • Loading branch information
martan001 committed Jan 24, 2024
1 parent 4a45287 commit a045555
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/indexers/its/JiraITSIndexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ class JiraITSIndexer {
.then(() => this.reporter.finishMilestone());
}),
]).then((resp) => {
log('Persisted %d new issues (%d already present)', persistCount, omitCount);
log(resp);
return Promise.all(resp.flat()).then(() => log('Persisted %d new issues (%d already present)', persistCount, omitCount));
});
}

Expand Down
2 changes: 1 addition & 1 deletion lib/paginator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Paginator.prototype.$depaginate = function (perPage: number, countHolder: { coun
}
if (stop !== false && processed < countHolder.count && !this.its) {
return this.$depaginate(perPage, countHolder, page + 1, processed);
} else if (stop !== false && this.its) {
} else if (stop !== false && processed < countHolder.count && this.its) {
i++;
return this.$depaginate(perPage, countHolder, this.defaultPageSize * i, processed, i);
}
Expand Down

0 comments on commit a045555

Please sign in to comment.