🛠️ Fix build compilation errors
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user