🛠️ Fix build compilation errors

This commit is contained in:
Hamza-Ayed
2026-04-22 01:17:49 +03:00
parent 444097814d
commit fd00e9c57d
4 changed files with 8 additions and 10 deletions

View File

@@ -1,8 +1,6 @@
import { Processor, Process } from '@nestjs/bull';
import { Job } from 'bull';
import { Processor, Process, InjectQueue } from '@nestjs/bull';
import { Job, Queue } from 'bull';
import { Logger } from '@nestjs/common';
import { InjectRedis } from '@liaoliaots/nestjs-redis';
import Redis from 'ioredis';
import { InvoicesService } from './invoice.service';
@Processor('invoice-bulk-queue')
@@ -11,7 +9,7 @@ export class BulkUploadProcessor {
constructor(
private readonly invoicesService: InvoicesService,
@InjectRedis() private readonly redis: Redis,
@InjectQueue('invoice-bulk-queue') private readonly bulkQueue: Queue,
) {}
@Process('process-zip')
@@ -24,11 +22,11 @@ export class BulkUploadProcessor {
// 1. Calculate Hash (MD5/SHA256)
// 2. Check Redis SMEMBERS to prevent duplicate processing
// const hash = 'calculated_file_hash';
// const exists = await this.redis.sismember(`company:${companyId}:invoice-hashes`, hash);
// const exists = await this.bulkQueue.client.sismember(`company:${companyId}:invoice-hashes`, hash);
// if (exists) return;
// 3. Save hash and trigger individual processing
// await this.redis.sadd(`company:${companyId}:invoice-hashes`, hash);
// await this.bulkQueue.client.sadd(`company:${companyId}:invoice-hashes`, hash);
// await this.invoicesService.processSingleFile(fileInZip, tenantId, companyId);
}
}