• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 16261453359

14 Jul 2025 08:04AM UTC coverage: 89.505% (-0.2%) from 89.688%
16261453359

Pull #2625

github

LucieFaire
add logging for the export consumer

Signed-off-by: dsh <11198975+LucieFaire@users.noreply.github.com>
Pull Request #2625: feat: Add BullMQ job queue system

3466 of 4236 branches covered (81.82%)

Branch coverage included in aggregate %.

35 of 75 new or added lines in 11 files covered. (46.67%)

20 existing lines in 6 files now uncovered.

12004 of 13048 relevant lines covered (92.0%)

544.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/modules/csv-export/csv-export.module.ts
1
import { CsvExportService } from '@/modules/csv-export/csv-export.service';
×
NEW
2
import { JobQueueService } from '@/datasources/job-queue/job-queue.service';
×
NEW
3
import { JobQueueShutdownHook } from '@/datasources/job-queue/job-queue.shutdown.hook';
×
NEW
4
import { CSV_EXPORT_QUEUE } from '@/domain/common/entities/jobs.constants';
×
NEW
5
import { IJobQueueService } from '@/domain/interfaces/job-queue.interface';
×
NEW
6
import { ILoggingService, LoggingService } from '@/logging/logging.interface';
×
NEW
7
import { BullModule, getQueueToken } from '@nestjs/bullmq';
×
UNCOV
8
import { Module } from '@nestjs/common';
×
9
import { Queue } from 'bullmq';
NEW
10
import { CsvExportConsumer } from '@/modules/csv-export/csv-export.consumer';
×
11

12
@Module({
13
  imports: [
14
    BullModule.registerQueue({
15
      name: CSV_EXPORT_QUEUE,
16
      defaultJobOptions: {
17
        removeOnComplete: 10,
18
        removeOnFail: 5,
19
        backoff: {
20
          type: 'exponential',
21
          delay: 2000,
22
        },
23
        attempts: 3,
24
      },
25
    }),
26
  ],
27
  providers: [
28
    CsvExportConsumer,
29
    CsvExportService,
30
    {
31
      provide: IJobQueueService,
32
      useFactory: (queue: Queue): IJobQueueService =>
NEW
33
        new JobQueueService(queue),
×
34
      inject: [getQueueToken(CSV_EXPORT_QUEUE)],
35
    },
36
    {
37
      provide: JobQueueShutdownHook,
38
      useFactory: (
39
        queue: Queue,
40
        logging: ILoggingService,
NEW
41
      ): JobQueueShutdownHook => new JobQueueShutdownHook(queue, logging),
×
42
      inject: [getQueueToken(CSV_EXPORT_QUEUE), LoggingService],
43
    },
44
  ],
45
  exports: [CsvExportService, BullModule],
46
})
47
export class CsvExportModule {}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc