690421:1628 Update RAG Module #01
CI / CD Pipeline / build (push) Successful in 4m53s
CI / CD Pipeline / deploy (push) Failing after 5m7s

This commit is contained in:
2026-04-21 16:28:23 +07:00
parent cf78e14709
commit 3143dd7263
8 changed files with 17 additions and 17 deletions
@@ -13,7 +13,7 @@ import { UserModule } from '../../modules/user/user.module';
TypeOrmModule.forFeature([Attachment]),
ScheduleModule.forRoot(), // ✅ เปิดใช้งาน Cron Job],
UserModule,
BullModule.registerQueue({ name: 'rag:ocr' }),
BullModule.registerQueue({ name: 'rag-ocr' }),
],
controllers: [FileStorageController],
providers: [
@@ -28,7 +28,7 @@ export class FileStorageService {
@InjectRepository(Attachment)
private attachmentRepository: Repository<Attachment>,
private configService: ConfigService,
@Optional() @InjectQueue('rag:ocr') private readonly ragOcrQueue?: Queue
@Optional() @InjectQueue('rag-ocr') private readonly ragOcrQueue?: Queue
) {
// ใช้ env vars จาก docker-compose สำหรับ Production
// ถ้าไม่ได้กำหนดจะ fallback เป็น ./uploads/temp และ ./uploads/permanent
@@ -180,7 +180,7 @@ export class FileStorageService {
)
.catch((err: unknown) => {
this.logger.error(
`Failed to enqueue rag:ocr for ${saved.publicId}`,
`Failed to enqueue rag-ocr for ${saved.publicId}`,
err instanceof Error ? err.stack : String(err)
);
});