Skip to content

Commit

Permalink
feat: read enableChangesStream when sync changes stream (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
killagu authored Jun 24, 2022
1 parent 1cf5c66 commit 0948a71
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/core/service/ChangesStreamService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export class ChangesStreamService extends AbstractService {
this.logger.warn('[ChangesStreamService.executeTask:firstSeq] GET %s status: %s, data: %j, since: %s',
changesStreamRegistry, status, data, since);
}
while (since) {
// allow disable changesStream dynamic
while (since && this.config.cnpmcore.enableChangesStream) {
const { lastSince, taskCount } = await this.handleChanges(since, task);
this.logger.warn('[ChangesStreamService.executeTask:changes] since: %s => %s, %d new tasks, taskId: %s, updatedAt: %j',
since, lastSince, taskCount, task.taskId, task.updatedAt);
Expand Down

0 comments on commit 0948a71

Please sign in to comment.