mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Upgrade amplitude stripe amazon-payments cwait (#9962)
* upgrade amplitude stripe amazon-payments cwait * correctly import cwait
This commit is contained in:
@@ -12,7 +12,7 @@ import { removeFromArray } from '../libs/collectionManipulators';
|
||||
import shared from '../../common';
|
||||
import { sendTxn as txnEmail } from '../libs/email';
|
||||
import { sendNotification as sendPushNotification } from '../libs/pushNotifications';
|
||||
import cwait from 'cwait';
|
||||
import { TaskQueue } from 'cwait';
|
||||
import { syncableAttrs, setNextDue } from '../libs/taskManager';
|
||||
|
||||
const Schema = mongoose.Schema;
|
||||
@@ -211,7 +211,7 @@ schema.methods.addTasks = async function challengeAddTasks (tasks) {
|
||||
let challenge = this;
|
||||
let membersIds = await _fetchMembersIds(challenge._id);
|
||||
|
||||
let queue = new cwait.TaskQueue(Bluebird, 25); // process only 5 users concurrently
|
||||
let queue = new TaskQueue(Bluebird, 25); // process only 5 users concurrently
|
||||
|
||||
await Bluebird.map(membersIds, queue.wrap((memberId) => {
|
||||
return _addTaskFn(challenge, tasks, memberId);
|
||||
|
||||
Reference in New Issue
Block a user