chore: temporarily disable cases and jobs modules
This commit is contained in:
parent
a22b84f128
commit
d34e140193
@ -37,6 +37,13 @@ A modern customer portal where users can self-register, log in, browse & buy sub
|
|||||||
- **BullMQ** for async jobs with ioredis
|
- **BullMQ** for async jobs with ioredis
|
||||||
- **OpenAPI/Swagger** for documentation
|
- **OpenAPI/Swagger** for documentation
|
||||||
|
|
||||||
|
### Temporarily Disabled Modules
|
||||||
|
|
||||||
|
- `CasesModule` and `JobsModule` are intentionally excluded from the running
|
||||||
|
NestJS application until their APIs and job processors are fully
|
||||||
|
implemented. See `docs/TEMPORARY-DISABLED-MODULES.md` for re-enablement
|
||||||
|
details and placeholder behaviour.
|
||||||
|
|
||||||
### Logging
|
### Logging
|
||||||
|
|
||||||
- Centralized structured logging via Pino using `nestjs-pino` in the BFF
|
- Centralized structured logging via Pino using `nestjs-pino` in the BFF
|
||||||
|
|||||||
@ -21,7 +21,6 @@ import { EmailModule } from "@bff/infra/email/email.module";
|
|||||||
// External Integration Modules
|
// External Integration Modules
|
||||||
import { IntegrationsModule } from "@bff/integrations/integrations.module";
|
import { IntegrationsModule } from "@bff/integrations/integrations.module";
|
||||||
import { SalesforceEventsModule } from "@bff/integrations/salesforce/events/events.module";
|
import { SalesforceEventsModule } from "@bff/integrations/salesforce/events/events.module";
|
||||||
import { JobsModule } from "@bff/modules/jobs/jobs.module";
|
|
||||||
|
|
||||||
// Feature Modules
|
// Feature Modules
|
||||||
import { AuthModule } from "@bff/modules/auth/auth.module";
|
import { AuthModule } from "@bff/modules/auth/auth.module";
|
||||||
@ -31,7 +30,6 @@ import { CatalogModule } from "@bff/modules/catalog/catalog.module";
|
|||||||
import { OrdersModule } from "@bff/modules/orders/orders.module";
|
import { OrdersModule } from "@bff/modules/orders/orders.module";
|
||||||
import { InvoicesModule } from "@bff/modules/invoices/invoices.module";
|
import { InvoicesModule } from "@bff/modules/invoices/invoices.module";
|
||||||
import { SubscriptionsModule } from "@bff/modules/subscriptions/subscriptions.module";
|
import { SubscriptionsModule } from "@bff/modules/subscriptions/subscriptions.module";
|
||||||
import { CasesModule } from "@bff/modules/cases/cases.module";
|
|
||||||
|
|
||||||
// System Modules
|
// System Modules
|
||||||
import { HealthModule } from "@bff/modules/health/health.module";
|
import { HealthModule } from "@bff/modules/health/health.module";
|
||||||
@ -73,7 +71,6 @@ import { SuccessResponseInterceptor } from "@bff/core/http/success-response.inte
|
|||||||
// === EXTERNAL INTEGRATIONS ===
|
// === EXTERNAL INTEGRATIONS ===
|
||||||
IntegrationsModule,
|
IntegrationsModule,
|
||||||
SalesforceEventsModule,
|
SalesforceEventsModule,
|
||||||
JobsModule,
|
|
||||||
|
|
||||||
// === FEATURE MODULES ===
|
// === FEATURE MODULES ===
|
||||||
AuthModule,
|
AuthModule,
|
||||||
@ -83,7 +80,6 @@ import { SuccessResponseInterceptor } from "@bff/core/http/success-response.inte
|
|||||||
OrdersModule,
|
OrdersModule,
|
||||||
InvoicesModule,
|
InvoicesModule,
|
||||||
SubscriptionsModule,
|
SubscriptionsModule,
|
||||||
CasesModule,
|
|
||||||
|
|
||||||
// === SYSTEM MODULES ===
|
// === SYSTEM MODULES ===
|
||||||
HealthModule,
|
HealthModule,
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import { CatalogModule } from "@bff/modules/catalog/catalog.module";
|
|||||||
import { OrdersModule } from "@bff/modules/orders/orders.module";
|
import { OrdersModule } from "@bff/modules/orders/orders.module";
|
||||||
import { InvoicesModule } from "@bff/modules/invoices/invoices.module";
|
import { InvoicesModule } from "@bff/modules/invoices/invoices.module";
|
||||||
import { SubscriptionsModule } from "@bff/modules/subscriptions/subscriptions.module";
|
import { SubscriptionsModule } from "@bff/modules/subscriptions/subscriptions.module";
|
||||||
import { CasesModule } from "@bff/modules/cases/cases.module";
|
|
||||||
|
|
||||||
export const apiRoutes: Routes = [
|
export const apiRoutes: Routes = [
|
||||||
{
|
{
|
||||||
@ -19,7 +18,6 @@ export const apiRoutes: Routes = [
|
|||||||
{ path: "", module: OrdersModule },
|
{ path: "", module: OrdersModule },
|
||||||
{ path: "", module: InvoicesModule },
|
{ path: "", module: InvoicesModule },
|
||||||
{ path: "", module: SubscriptionsModule },
|
{ path: "", module: SubscriptionsModule },
|
||||||
{ path: "", module: CasesModule },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@ -1,11 +1,22 @@
|
|||||||
import { Processor, WorkerHost } from "@nestjs/bullmq";
|
import { Processor, WorkerHost } from "@nestjs/bullmq";
|
||||||
|
import { Logger } from "@nestjs/common";
|
||||||
import { Job } from "bullmq";
|
import { Job } from "bullmq";
|
||||||
import { QUEUE_NAMES } from "@bff/infra/queue/queue.constants";
|
import { QUEUE_NAMES } from "@bff/infra/queue/queue.constants";
|
||||||
|
|
||||||
@Processor(QUEUE_NAMES.RECONCILE)
|
@Processor(QUEUE_NAMES.RECONCILE)
|
||||||
export class ReconcileProcessor extends WorkerHost {
|
export class ReconcileProcessor extends WorkerHost {
|
||||||
async process(_job: Job) {
|
private readonly logger = new Logger(ReconcileProcessor.name);
|
||||||
// TODO: Implement reconciliation logic
|
|
||||||
// Note: In production, this should use proper logging
|
async process(job: Job) {
|
||||||
|
this.logger.warn(
|
||||||
|
`Skipping reconciliation job while JobsModule is temporarily disabled`,
|
||||||
|
{
|
||||||
|
jobId: job.id,
|
||||||
|
name: job.name,
|
||||||
|
attemptsMade: job.attemptsMade,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
return { status: "skipped", reason: "jobs_module_disabled" };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
28
docs/TEMPORARY-DISABLED-MODULES.md
Normal file
28
docs/TEMPORARY-DISABLED-MODULES.md
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Temporarily Disabled Modules
|
||||||
|
|
||||||
|
The backend currently omits two partially implemented modules from the runtime
|
||||||
|
NestJS configuration so that the public API surface only exposes completed
|
||||||
|
features.
|
||||||
|
|
||||||
|
## Cases Module
|
||||||
|
|
||||||
|
- Removed from `AppModule` and `apiRoutes` to ensure the unfinished `/cases`
|
||||||
|
endpoints are not routable.
|
||||||
|
- All existing code remains in `apps/bff/src/modules/cases/` for future
|
||||||
|
development; re-enable by importing the module in
|
||||||
|
`apps/bff/src/app.module.ts` and adding it back to the router configuration in
|
||||||
|
`apps/bff/src/core/config/router.config.ts` once the endpoints are ready.
|
||||||
|
|
||||||
|
## Jobs Module
|
||||||
|
|
||||||
|
- Temporarily excluded from `AppModule` while the reconciliation workflows are
|
||||||
|
fleshed out.
|
||||||
|
- The BullMQ processor now logs an explicit warning and acknowledges each job so
|
||||||
|
queue workers do not hang when the module is re-registered.
|
||||||
|
- When background processing is ready, restore the `JobsModule` import in
|
||||||
|
`apps/bff/src/app.module.ts` and replace the placeholder logic in
|
||||||
|
`ReconcileProcessor.process` with the real reconciliation implementation.
|
||||||
|
|
||||||
|
> **Note**: If additional queues or HTTP routes reference these modules, make
|
||||||
|
> sure they fail fast with a `501 Not Implemented` response or similar logging so
|
||||||
|
> that downstream systems have clear telemetry while the modules are disabled.
|
||||||
Loading…
x
Reference in New Issue
Block a user