Update comment on number of simulatenaeous users to be updated concurrently in TaskQueue.

This commit is contained in:
osiris
2020-06-21 08:38:38 +08:00
parent 25df9d5991
commit caaca469f8
+1 -1
View File
@@ -255,7 +255,7 @@ schema.methods.addTasks = async function challengeAddTasks (tasks) {
const challenge = this;
const membersIds = await _fetchMembersIds(challenge._id);
const queue = new TaskQueue(Promise, 25); // process only 5 users concurrently
const queue = new TaskQueue(Promise, 25); // process only this many users concurrently
await Promise.all(membersIds.map(queue.wrap(memberId => _addTaskFn(challenge, tasks, memberId))));
};