Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
fix: syncModel none not end bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Feb 3, 2015
1 parent a6a53e3 commit fa94bc7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions controllers/sync_module_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ SyncModuleWorker.prototype.start = function () {
return;
}

if (config.syncModel === 'none') {
return;
}

var arr = [];
for (var i = 0; i < that.concurrency; i++) {
arr.push(that.next(i));
Expand Down Expand Up @@ -283,6 +279,10 @@ SyncModuleWorker.prototype.syncUser = function* () {
};

SyncModuleWorker.prototype.next = function* (concurrencyId) {
if (config.syncModel === 'none') {
return this.finish();
}

var name = this.names.shift();
if (!name) {
return setImmediate(this.finish.bind(this));
Expand Down

0 comments on commit fa94bc7

Please sign in to comment.