Skip to content

Commit f78c99e

Browse files
authored
Merge pull request #12 from topcoder-platform/pm-2539
chore(PM-2539): added timeout for prisma service
2 parents bfeae65 + 3c01538 commit f78c99e

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ workflows:
6868
branches:
6969
only:
7070
- develop
71+
- pm-2539
7172

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

.env.sample

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ SERVICEACC02_CID="devadmin1"
143143
SERVICEACC02_SECRET="devadmin1"
144144
SERVICEACC02_UID="100000027"
145145

146-
# Note: Registration default password is no longer configurable; for social/SSO
147-
# registrations without a provided password, a unique 16-character random
148-
# password is generated at registration time.
146+
# Note: Registration default password is no longer configurable; for social/SSO
147+
# registrations without a provided password, a unique 16-character random
148+
# password is generated at registration time.
149+
150+
151+
# Prisma configuration
152+
153+
IDENTITY_SERVICE_PRISMA_TIMEOUT=10000

src/shared/member-prisma/member-prisma.service.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ export class MemberPrismaService
66
extends MemberPrismaClient
77
implements OnModuleInit, OnModuleDestroy
88
{
9+
constructor() {
10+
super({
11+
transactionOptions: {
12+
timeout: process.env.IDENTITY_SERVICE_PRISMA_TIMEOUT
13+
? parseInt(process.env.IDENTITY_SERVICE_PRISMA_TIMEOUT, 10)
14+
: 10000,
15+
},
16+
});
17+
}
18+
919
async onModuleInit() {
1020
await this.$connect();
1121
}

0 commit comments

Comments
 (0)