|
@@ -318,7 +318,7 @@ class default_1 {
|
|
|
});
|
|
|
const queuedFeeds = lock.feed.slice(0, lock.workon ? lock.workon + 1 : undefined).reverse();
|
|
|
utils_1.chainPromises(utils_1.Arr.chunk(queuedFeeds, 5).map((arr, i) => () => Promise.all(arr.map((currentFeed, j) => {
|
|
|
- lock.workon = (queuedFeeds.length - 1) - i * 5 + j;
|
|
|
+ lock.workon = (queuedFeeds.length - 1) - (i * 5 + j);
|
|
|
fs.writeFileSync(path.resolve(this.lockfile), JSON.stringify(lock));
|
|
|
const promiseDelay = this.workInterval * (Math.random() + j) * 500 / lock.feed.length;
|
|
|
logger.debug(`timeout for this pull job: ${promiseDelay * 2}`);
|