forked from podkrepi-bg/api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(prisma): Too many idle db connections (podkrepi-bg#646)
* fix(prisma): Add prisma module Needed to prevent creation of many PrismaService instances * chore: Replace PersonService provider with PersonModule import
- Loading branch information
1 parent
e86bd01
commit efdc309
Showing
32 changed files
with
102 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { Module } from '@nestjs/common' | ||
import { BankAccountService } from './bankaccount.service' | ||
import { BankAccountController } from './bankaccount.controller' | ||
import { PrismaService } from '../prisma/prisma.service' | ||
import { PrismaModule } from '../prisma/prisma.module' | ||
|
||
@Module({ | ||
imports: [PrismaModule], | ||
controllers: [BankAccountController], | ||
providers: [BankAccountService, PrismaService], | ||
providers: [BankAccountService], | ||
}) | ||
export class BankAccountModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { Module } from '@nestjs/common' | ||
import { BenefactorService } from './benefactor.service' | ||
import { BenefactorController } from './benefactor.controller' | ||
import { PrismaService } from '../prisma/prisma.service' | ||
import { PrismaModule } from '../prisma/prisma.module' | ||
|
||
@Module({ | ||
imports: [PrismaModule], | ||
controllers: [BenefactorController], | ||
providers: [BenefactorService, PrismaService], | ||
providers: [BenefactorService], | ||
}) | ||
export class BenefactorModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { Module } from '@nestjs/common' | ||
import { PrismaService } from '../prisma/prisma.service' | ||
import { BeneficiaryController } from './beneficiary.controller' | ||
import { BeneficiaryService } from './beneficiary.service' | ||
import { PrismaModule } from '../prisma/prisma.module' | ||
|
||
@Module({ | ||
imports: [PrismaModule], | ||
controllers: [BeneficiaryController], | ||
providers: [BeneficiaryService, PrismaService], | ||
providers: [BeneficiaryService], | ||
}) | ||
export class BeneficiaryModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,18 @@ | ||
import { Module } from '@nestjs/common' | ||
import { CampaignFileService } from './campaign-file.service' | ||
import { CampaignFileController } from './campaign-file.controller' | ||
import { PrismaService } from '../prisma/prisma.service' | ||
import { S3Service } from '../s3/s3.service' | ||
import { PersonService } from '../person/person.service' | ||
import { CampaignService } from '../campaign/campaign.service' | ||
import { VaultService } from '../vault/vault.service' | ||
import { NotificationModule } from '../sockets/notifications/notification.module' | ||
import { MarketingNotificationsModule } from '../notifications/notifications.module' | ||
import { PrismaModule } from '../prisma/prisma.module' | ||
|
||
@Module({ | ||
imports: [NotificationModule, MarketingNotificationsModule], | ||
imports: [NotificationModule, MarketingNotificationsModule, PrismaModule], | ||
|
||
controllers: [CampaignFileController], | ||
providers: [ | ||
CampaignFileService, | ||
PrismaService, | ||
S3Service, | ||
PersonService, | ||
CampaignService, | ||
VaultService, | ||
], | ||
providers: [CampaignFileService, S3Service, PersonService, CampaignService, VaultService], | ||
}) | ||
export class CampaignFileModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import { Module } from '@nestjs/common' | ||
import { CampaignNewsService } from './campaign-news.service' | ||
import { CampaignNewsController } from './campaign-news.controller' | ||
import { PrismaService } from '../prisma/prisma.service' | ||
import { PersonModule } from '../person/person.module' | ||
import { MarketingNotificationsModule } from '../notifications/notifications.module' | ||
import { ConfigService } from '@nestjs/config' | ||
import { EmailService } from '../email/email.service' | ||
import { PrismaModule } from '../prisma/prisma.module' | ||
|
||
@Module({ | ||
imports: [PersonModule, MarketingNotificationsModule], | ||
imports: [PersonModule, MarketingNotificationsModule, PrismaModule], | ||
controllers: [CampaignNewsController], | ||
providers: [CampaignNewsService, PrismaService, ConfigService, EmailService], | ||
providers: [CampaignNewsService, ConfigService, EmailService], | ||
exports: [CampaignNewsService], | ||
}) | ||
export class CampaignNewsModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { Module } from '@nestjs/common' | ||
import { CampaignTypesService } from './campaign-types.service' | ||
import { CampaignTypesController } from './campaign-types.controller' | ||
import { PrismaService } from '../prisma/prisma.service' | ||
import { PrismaModule } from '../prisma/prisma.module' | ||
|
||
@Module({ | ||
imports: [PrismaModule], | ||
controllers: [CampaignTypesController], | ||
providers: [CampaignTypesService, PrismaService], | ||
providers: [CampaignTypesService], | ||
}) | ||
export class CampaignTypesModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import { Module } from '@nestjs/common' | ||
import { CompanyService } from './company.service' | ||
import { CompanyController } from './company.controller' | ||
import { PrismaService } from '../prisma/prisma.service' | ||
import { PrismaModule } from '../prisma/prisma.module' | ||
|
||
@Module({ | ||
imports: [PrismaModule], | ||
controllers: [CompanyController], | ||
providers: [CompanyService, PrismaService], | ||
providers: [CompanyService], | ||
exports: [CompanyService], | ||
}) | ||
export class CompanyModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { Module } from '@nestjs/common' | ||
import { CoordinatorService } from './coordinator.service' | ||
import { CoordinatorController } from './coordinator.controller' | ||
import { PrismaService } from '../prisma/prisma.service' | ||
import { PrismaModule } from '../prisma/prisma.module' | ||
|
||
@Module({ | ||
imports: [PrismaModule], | ||
controllers: [CoordinatorController], | ||
providers: [CoordinatorService, PrismaService], | ||
providers: [CoordinatorService], | ||
}) | ||
export class CoordinatorModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { Module } from '@nestjs/common' | ||
import { CountryService } from './country.service' | ||
import { CountryController } from './country.controller' | ||
import { PrismaService } from '../prisma/prisma.service' | ||
import { PrismaModule } from '../prisma/prisma.module' | ||
|
||
@Module({ | ||
imports: [PrismaModule], | ||
controllers: [CountryController], | ||
providers: [CountryService, PrismaService], | ||
providers: [CountryService], | ||
}) | ||
export class CountryModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import { Module } from '@nestjs/common' | ||
import { ExpensesService } from './expenses.service' | ||
import { ExpensesController } from './expenses.controller' | ||
import { PrismaService } from '../prisma/prisma.service' | ||
import { S3Service } from '../s3/s3.service' | ||
import { PrismaModule } from '../prisma/prisma.module' | ||
|
||
@Module({ | ||
imports: [PrismaModule], | ||
controllers: [ExpensesController], | ||
providers: [PrismaService, ExpensesService, S3Service], | ||
providers: [ExpensesService, S3Service], | ||
}) | ||
export class ExpensesModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.