Skip to content

Commit 0887655

Browse files
committed
fix: added timeout for prisma client
1 parent c9bf7cd commit 0887655

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ workflows:
119119
only:
120120
- develop
121121
- hotfix/deploy
122-
- pm-2456
122+
- pm-2539
123123

124124
# Production builds are exectuted only on tagged commits to the testing
125125
# master branch.

config/default.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,6 @@ module.exports = {
5959
},
6060

6161
AUTOMATED_TESTING_NAME_PREFIX: process.env.AUTOMATED_TESTING_NAME_PREFIX || 'POSTMANE2E-',
62-
TOPCROWD_CHALLENGE_TEMPLATE_ID: process.env.TOPCROWD_CHALLENGE_TEMPLATE_ID || '517e76b0-8824-4e72-9b48-a1ebde1793a8'
62+
TOPCROWD_CHALLENGE_TEMPLATE_ID: process.env.TOPCROWD_CHALLENGE_TEMPLATE_ID || '517e76b0-8824-4e72-9b48-a1ebde1793a8',
63+
RESOURCE_SERVICE_PRISMA_TIMEOUT: process.env.RESOURCE_SERVICE_PRISMA_TIMEOUT ? parseInt(process.env.RESOURCE_SERVICE_PRISMA_TIMEOUT, 10) : 10000,
6364
}
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
const { PrismaClient } = require('@prisma/client');
2+
const config = require('config')
23

3-
const prisma = new PrismaClient();
4+
const prisma = new PrismaClient({
5+
transactionOptions: {
6+
timeout: config.MEMBER_SERVICE_PRISMA_TIMEOUT,
7+
},
8+
});
49

510
module.exports = prisma;
611

0 commit comments

Comments
 (0)