Merge pull request #7 from NTumurbars/codex/temporarily-remove-casesmodule-and-jobsmodule
Temporarily disable unfinished cases and jobs modules
This commit is contained in:
commit
ed32a38804
@ -37,6 +37,13 @@ A modern customer portal where users can self-register, log in, browse & buy sub
|
||||
- **BullMQ** for async jobs with ioredis
|
||||
- **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
|
||||
|
||||
- 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
|
||||
import { IntegrationsModule } from "@bff/integrations/integrations.module";
|
||||
import { SalesforceEventsModule } from "@bff/integrations/salesforce/events/events.module";
|
||||
import { JobsModule } from "@bff/modules/jobs/jobs.module";
|
||||
|
||||
// Feature Modules
|
||||
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 { InvoicesModule } from "@bff/modules/invoices/invoices.module";
|
||||
import { SubscriptionsModule } from "@bff/modules/subscriptions/subscriptions.module";
|
||||
import { CasesModule } from "@bff/modules/cases/cases.module";
|
||||
|
||||
// System Modules
|
||||
import { HealthModule } from "@bff/modules/health/health.module";
|
||||
@ -73,7 +71,6 @@ import { SuccessResponseInterceptor } from "@bff/core/http/success-response.inte
|
||||
// === EXTERNAL INTEGRATIONS ===
|
||||
IntegrationsModule,
|
||||
SalesforceEventsModule,
|
||||
JobsModule,
|
||||
|
||||
// === FEATURE MODULES ===
|
||||
AuthModule,
|
||||
@ -83,7 +80,6 @@ import { SuccessResponseInterceptor } from "@bff/core/http/success-response.inte
|
||||
OrdersModule,
|
||||
InvoicesModule,
|
||||
SubscriptionsModule,
|
||||
CasesModule,
|
||||
|
||||
// === SYSTEM MODULES ===
|
||||
HealthModule,
|
||||
|
||||
@ -6,7 +6,6 @@ import { CatalogModule } from "@bff/modules/catalog/catalog.module";
|
||||
import { OrdersModule } from "@bff/modules/orders/orders.module";
|
||||
import { InvoicesModule } from "@bff/modules/invoices/invoices.module";
|
||||
import { SubscriptionsModule } from "@bff/modules/subscriptions/subscriptions.module";
|
||||
import { CasesModule } from "@bff/modules/cases/cases.module";
|
||||
|
||||
export const apiRoutes: Routes = [
|
||||
{
|
||||
@ -19,7 +18,6 @@ export const apiRoutes: Routes = [
|
||||
{ path: "", module: OrdersModule },
|
||||
{ path: "", module: InvoicesModule },
|
||||
{ path: "", module: SubscriptionsModule },
|
||||
{ path: "", module: CasesModule },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@ -1,11 +1,22 @@
|
||||
import { Processor, WorkerHost } from "@nestjs/bullmq";
|
||||
import { Logger } from "@nestjs/common";
|
||||
import { Job } from "bullmq";
|
||||
import { QUEUE_NAMES } from "@bff/infra/queue/queue.constants";
|
||||
|
||||
@Processor(QUEUE_NAMES.RECONCILE)
|
||||
export class ReconcileProcessor extends WorkerHost {
|
||||
async process(_job: Job) {
|
||||
// TODO: Implement reconciliation logic
|
||||
// Note: In production, this should use proper logging
|
||||
private readonly logger = new Logger(ReconcileProcessor.name);
|
||||
|
||||
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