Skip to content

Commit 675dde2

Browse files
committed
added timeout for prisma services
1 parent 141598e commit 675dde2

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ workflows:
6767
branches:
6868
only:
6969
- develop
70+
- pm-2539
7071

7172
# Production builds are exectuted only on tagged commits to the
7273
# master branch.

config/default.js

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

122122
HASHING_KEYS: {
123123
USERFLOW: process.env.USERFLOW_PRIVATE_KEY
124-
}
124+
},
125+
MEMBER_SERVICE_PRISMA_TIMEOUT: process.env.MEMBER_SERVICE_PRISMA_TIMEOUT ? parseInt(process.env.MEMBER_SERVICE_PRISMA_TIMEOUT, 10) : 10000,
125126
}

src/common/prisma.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ const {
44
Prisma
55
} = require('../../prisma/generated/client')
66
const { PrismaClient: SkillsPrismaClient } = require('../../prisma/generated/skills-client')
7+
const config = require('config')
78

89
const clientOptions = {
10+
transactionOptions: {
11+
timeout: config.MEMBER_SERVICE_PRISMA_TIMEOUT,
12+
},
913
log: [
1014
{ level: 'query', emit: 'event' },
1115
{ level: 'info', emit: 'event' },

0 commit comments

Comments
 (0)