Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions nexus/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"audit:verify-chain": "ts-node -r tsconfig-paths/register scripts/verify-audit-chain.ts"
},
"dependencies": {
"@nestjs/bullmq": "11.0.4",
"@nexus/shared": "*",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/auto-instrumentations-node": "^0.70.1",
Expand All @@ -43,10 +44,11 @@
"@sentry/profiling-node": "^10.42.0",
"@types/multer": "^2.0.0",
"@types/streamifier": "^0.1.2",
"ajv": "^8.18.0",
"ajv-formats": "^3.0.1",
"axios": "^1.13.5",
"bcrypt": "^6.0.0",
"bullmq": "5.70.1",
"@nestjs/bullmq": "11.0.4",
"cache-manager": "^7.2.8",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
Expand All @@ -70,8 +72,7 @@
"streamifier": "^0.1.1",
"swagger-ui-express": "^5.0.1",
"winston": "^3.19.0",
"zod": "^4.3.6",
"ajv": "^8.18.0"
"zod": "^4.3.6"
},
"devDependencies": {
"@nestjs/cli": "^11.0.16",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class BulkImportProcessor extends WorkerHost {
);

// Idempotency guard: check if this exact job was already completed
const existing = await (this.prisma as any).backgroundJob.findUnique({
const existing = await this.prisma.backgroundJob.findUnique({
where: { idempotencyKey },
});
if (existing?.status === 'Completed') {
Expand All @@ -50,7 +50,7 @@ export class BulkImportProcessor extends WorkerHost {
}

// Mark as processing
const jobRecord = await (this.prisma as any).backgroundJob.upsert({
const jobRecord = await this.prisma.backgroundJob.upsert({
where: { idempotencyKey },
update: {
status: 'Processing',
Expand Down Expand Up @@ -214,7 +214,7 @@ export class BulkImportProcessor extends WorkerHost {
}
}

await (this.prisma as any).backgroundJob.update({
await this.prisma.backgroundJob.update({
where: { id: jobRecord.id },
data: {
status: 'Completed',
Expand All @@ -230,7 +230,7 @@ export class BulkImportProcessor extends WorkerHost {
}, // end tenantContext.run
);
} catch (err: any) {
await (this.prisma as any).backgroundJob.update({
await this.prisma.backgroundJob.update({
where: { id: jobRecord.id },
data: { status: 'Failed', failedAt: new Date(), error: err.message },
});
Expand Down
Loading