Skip to content

Commit

Permalink
add environment to queue name
Browse files Browse the repository at this point in the history
  • Loading branch information
demshy committed Sep 13, 2024
1 parent bea16ec commit 9049f77
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/activities/activities.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { Sector } from '../crags/entities/sector.entity';
import { Country } from '../crags/entities/country.entity';
import { BullModule } from '@nestjs/bull';
import { CragsModule } from '../crags/crags.module';
import { env } from 'process';

@Module({
imports: [
Expand All @@ -39,7 +40,7 @@ import { CragsModule } from '../crags/crags.module';
forwardRef(() => AuditModule), // because audit module is imported in usersmodule and this constitutes a circular dependency (users->audit->activities->users...)
forwardRef(() => UsersModule),
BullModule.registerQueue({
name: 'summary',
name: `${env.ENVIRONMENT}-summary`,
}),
CragsModule,
],
Expand Down
3 changes: 2 additions & 1 deletion src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import EntityCacheSubscriber from './core/utils/entity-cache/entity-cache.subscr
import { SnakeNamingStrategy } from 'typeorm-naming-strategies';
import { BullModule } from '@nestjs/bull';
import { Parking } from './crags/entities/parking.entity';
import { env } from 'process';

@Module({
imports: [
Expand Down Expand Up @@ -133,7 +134,7 @@ import { Parking } from './crags/entities/parking.entity';
inject: [ConfigService],
}),
BullModule.registerQueue({
name: 'summary',
name: `${env.ENVIRONMENT}-summary`,
}),
],
providers: [],
Expand Down
3 changes: 2 additions & 1 deletion src/audit/audit.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { ActivityRoute } from '../activities/entities/activity-route.entity';
import { BullModule } from '@nestjs/bull';
import { UsersModule } from '../users/users.module';
import { CragsModule } from '../crags/crags.module';
import { env } from 'process';

@Module({
imports: [
Expand All @@ -40,7 +41,7 @@ import { CragsModule } from '../crags/crags.module';
]),
AuthModule,
BullModule.registerQueue({
name: 'summary',
name: `${env.ENVIRONMENT}-summary`,
}),
forwardRef(() => UsersModule),
forwardRef(() => CragsModule),
Expand Down
3 changes: 2 additions & 1 deletion src/crags/crags.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ import { RouteEvent } from './entities/route-event.entity';
import { Parking } from './entities/parking.entity';
import { ParkingsService } from './services/parkings.service';
import { AreaLoader } from './loaders/area.loader';
import { env } from 'process';

@Module({
imports: [
Expand Down Expand Up @@ -101,7 +102,7 @@ import { AreaLoader } from './loaders/area.loader';
]),
forwardRef(() => AuditModule),
BullModule.registerQueue({
name: 'summary',
name: `${env.ENVIRONMENT}-summary`,
}),
],
providers: [
Expand Down

0 comments on commit 9049f77

Please sign in to comment.