miinventario-v2/apps/backend/src/modules/exports/exports.processor.ts
rckrdmrd c24f889f70
Some checks failed
Build / Build Backend (push) Has been cancelled
Build / Build Mobile (TypeScript Check) (push) Has been cancelled
Lint / Lint Backend (push) Has been cancelled
Lint / Lint Mobile (push) Has been cancelled
Test / Backend E2E Tests (push) Has been cancelled
Test / Mobile Unit Tests (push) Has been cancelled
Build / Build Docker Image (push) Has been cancelled
[MIINVENTARIO] feat: Add exports, reports, integrations modules and CI/CD pipeline
- Add exports module with PDF/CSV/Excel generation
- Add reports module for inventory analytics
- Add POS integrations module
- Add database migrations for exports, movements and integrations
- Add GitHub Actions CI/CD workflow with Docker support
- Add mobile export and reports screens with tests
- Update epic documentation with traceability
- Add deployment and security guides

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 06:06:34 -06:00

31 lines
973 B
TypeScript

import { Process, Processor } from '@nestjs/bull';
import { Logger } from '@nestjs/common';
import { Job } from 'bull';
import { ExportsService, ExportJobData } from './exports.service';
@Processor('exports')
export class ExportsProcessor {
private readonly logger = new Logger(ExportsProcessor.name);
constructor(private readonly exportsService: ExportsService) {}
@Process('generate-export')
async handleExport(job: Job<ExportJobData>): Promise<void> {
this.logger.log(
`Processing export job ${job.data.jobId} for store ${job.data.storeId}`,
);
try {
await this.exportsService.processExport(job.data);
this.logger.log(`Export job ${job.data.jobId} completed successfully`);
} catch (error) {
this.logger.error(
`Export job ${job.data.jobId} failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
error instanceof Error ? error.stack : undefined,
);
throw error;
}
}
}