Skip to content

Commit f369924

Browse files
committed
added constants for maximum parallel requests quantity #334
1 parent c95b086 commit f369924

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/constants.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,5 @@ export const INVITE_STATUS = {
182182
REQUEST_APPROVED: 'request_approved',
183183
CANCELED: 'canceled',
184184
};
185+
186+
export const MAX_PARALLEL_REQUEST_QTY = 5;

src/routes/projectMemberInvites/create.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { middleware as tcMiddleware } from 'tc-core-library-js';
88
import models from '../../models';
99
import util from '../../util';
1010
import { PROJECT_MEMBER_ROLE, PROJECT_MEMBER_MANAGER_ROLES,
11-
MANAGER_ROLES, INVITE_STATUS, EVENT, BUS_API_EVENT, USER_ROLE } from '../../constants';
11+
MANAGER_ROLES, INVITE_STATUS, EVENT, BUS_API_EVENT, USER_ROLE, MAX_PARALLEL_REQUEST_QTY } from '../../constants';
1212
import { createEvent } from '../../services/busApi';
1313

1414

@@ -80,7 +80,7 @@ const buildCreateInvitePromises = (req, invite, invites, data, failed) => {
8080
if (invite.emails) {
8181
// if for some emails there are already existent users, we will invite them by userId,
8282
// to avoid sending them registration email
83-
return util.lookupMultipleUserEmails(req, invite.emails, 5)
83+
return util.lookupMultipleUserEmails(req, invite.emails, MAX_PARALLEL_REQUEST_QTY)
8484
.then((existentUsers) => {
8585
// existent user we will invite by userId and email
8686
const existentUsersWithNumberId = existentUsers.map((user) => {

0 commit comments

Comments
 (0)