diff --git a/sources/packages/backend/apps/db-migrations/src/migrations/1724722614598-UpdateConfigurationSchedulerCron.ts b/sources/packages/backend/apps/db-migrations/src/migrations/1724722614598-UpdateConfigurationSchedulerCron.ts new file mode 100644 index 0000000000..6a1c22913a --- /dev/null +++ b/sources/packages/backend/apps/db-migrations/src/migrations/1724722614598-UpdateConfigurationSchedulerCron.ts @@ -0,0 +1,21 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; +import { getSQLFileData } from "../utilities/sqlLoader"; + +export class UpdateConfigurationSchedulerCron1724722614598 + implements MigrationInterface +{ + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + getSQLFileData("Update-configuration-scheduler-cron.sql", "Queue"), + ); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query( + getSQLFileData( + "Rollback-update-configuration-scheduler-cron.sql", + "Queue", + ), + ); + } +} diff --git a/sources/packages/backend/apps/db-migrations/src/migrations/1724724771391-UpdateQueueNameSINValidationRequest.ts b/sources/packages/backend/apps/db-migrations/src/migrations/1724724771391-UpdateQueueNameSINValidationRequest.ts new file mode 100644 index 0000000000..260fdc5381 --- /dev/null +++ b/sources/packages/backend/apps/db-migrations/src/migrations/1724724771391-UpdateQueueNameSINValidationRequest.ts @@ -0,0 +1,21 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; +import { getSQLFileData } from "../utilities/sqlLoader"; + +export class UpdateQueueNameSINValidationRequest1724724771391 + implements MigrationInterface +{ + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + getSQLFileData("Update-queue-name-sin-validation-request.sql", "Queue"), + ); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query( + getSQLFileData( + "Rollback-update-queue-name-sin-validation-request.sql", + "Queue", + ), + ); + } +} diff --git a/sources/packages/backend/apps/db-migrations/src/sql/Queue/Rollback-update-configuration-scheduler-cron.sql b/sources/packages/backend/apps/db-migrations/src/sql/Queue/Rollback-update-configuration-scheduler-cron.sql new file mode 100644 index 0000000000..748ab4cd2f --- /dev/null +++ b/sources/packages/backend/apps/db-migrations/src/sql/Queue/Rollback-update-configuration-scheduler-cron.sql @@ -0,0 +1,227 @@ +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 14 * * *"', + false + ) +where + queue_name = 'ier12-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 2,8,14,20 * * *"', + false + ) +where + queue_name = 'cra-process-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 5,11,17,23 * * *"', + false + ) +where + queue_name = 'cra-response-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 17 * * *"', + false + ) +where + queue_name = 'sin-validation-process-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 17 * * *"', + false + ) +where + queue_name = 'sin-validation-request-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 14 * * *"', + false + ) +where + queue_name = 'part-time-msfaa-process-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 14 * * *"', + false + ) +where + queue_name = 'part-time-e-cert-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 17 * * *"', + false + ) +where + queue_name = 'part-time-feedback-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 14 * * *"', + false + ) +where + queue_name = 'full-time-msfaa-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 14 * * *"', + false + ) +where + queue_name = 'full-time-e-cert-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 17 * * *"', + false + ) +where + queue_name = 'full-time-feedback-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 11 * * *"', + false + ) +where + queue_name = 'federal-restrictions-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 17 * * *"', + false + ) +where + queue_name = 'disbursement-receipts-file-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 14 * * *"', + false + ) +where + queue_name = 'ece-process-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 14 * * *"', + false + ) +where + queue_name = 'ece-process-response-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 17 * * *"', + false + ) +where + queue_name = 'part-time-msfaa-process-response-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 17 * * *"', + false + ) +where + queue_name = 'full-time-msfaa-process-response-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 17 * * *"', + false + ) +where + queue_name = 'student-loan-balances-part-time-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 12 * * *"', + false + ) +where + queue_name = 'sfas-integration'; \ No newline at end of file diff --git a/sources/packages/backend/apps/db-migrations/src/sql/Queue/Rollback-update-queue-name-sin-validation-request.sql b/sources/packages/backend/apps/db-migrations/src/sql/Queue/Rollback-update-queue-name-sin-validation-request.sql new file mode 100644 index 0000000000..7b90001b39 --- /dev/null +++ b/sources/packages/backend/apps/db-migrations/src/sql/Queue/Rollback-update-queue-name-sin-validation-request.sql @@ -0,0 +1,6 @@ +update + sims.queue_configurations +set + queue_name = 'sin-validation-request-integration' +where + queue_name = 'sin-validation-response-integration'; \ No newline at end of file diff --git a/sources/packages/backend/apps/db-migrations/src/sql/Queue/Update-configuration-scheduler-cron.sql b/sources/packages/backend/apps/db-migrations/src/sql/Queue/Update-configuration-scheduler-cron.sql new file mode 100644 index 0000000000..7f5acb068d --- /dev/null +++ b/sources/packages/backend/apps/db-migrations/src/sql/Queue/Update-configuration-scheduler-cron.sql @@ -0,0 +1,227 @@ +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"15/30 * * * *"', + false + ) +where + queue_name = 'ier12-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 5 * * *"', + false + ) +where + queue_name = 'cra-process-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 16 * * *"', + false + ) +where + queue_name = 'cra-response-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 14 * * *"', + false + ) +where + queue_name = 'sin-validation-process-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 14 * * *"', + false + ) +where + queue_name = 'sin-validation-request-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 8 * * *"', + false + ) +where + queue_name = 'part-time-msfaa-process-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 8 * * *"', + false + ) +where + queue_name = 'part-time-e-cert-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 12 * * *"', + false + ) +where + queue_name = 'part-time-feedback-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 9 * * *"', + false + ) +where + queue_name = 'full-time-msfaa-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 6 * * *"', + false + ) +where + queue_name = 'full-time-e-cert-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 20 * * *"', + false + ) +where + queue_name = 'full-time-feedback-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 13 * * *"', + false + ) +where + queue_name = 'federal-restrictions-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"30 18 * * *"', + false + ) +where + queue_name = 'disbursement-receipts-file-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 6 * * *"', + false + ) +where + queue_name = 'ece-process-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"45 09 * * *"', + false + ) +where + queue_name = 'ece-process-response-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"0 12 * * *"', + false + ) +where + queue_name = 'part-time-msfaa-process-response-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"15 17 * * *"', + false + ) +where + queue_name = 'full-time-msfaa-process-response-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"30 6 * * *"', + false + ) +where + queue_name = 'student-loan-balances-part-time-integration'; + +update + sims.queue_configurations +set + queue_configuration = jsonb_set( + queue_configuration, + '{cron}', + '"15/30 * * * *"', + false + ) +where + queue_name = 'sfas-integration'; \ No newline at end of file diff --git a/sources/packages/backend/apps/db-migrations/src/sql/Queue/Update-queue-name-sin-validation-request.sql b/sources/packages/backend/apps/db-migrations/src/sql/Queue/Update-queue-name-sin-validation-request.sql new file mode 100644 index 0000000000..baaf2575b9 --- /dev/null +++ b/sources/packages/backend/apps/db-migrations/src/sql/Queue/Update-queue-name-sin-validation-request.sql @@ -0,0 +1,6 @@ +update + sims.queue_configurations +set + queue_name = 'sin-validation-response-integration' +where + queue_name = 'sin-validation-request-integration'; \ No newline at end of file diff --git a/sources/packages/backend/apps/queue-consumers/src/processors/schedulers/esdc-integration/sin-validation-integration/sin-validation-process-response-integration.scheduler.ts b/sources/packages/backend/apps/queue-consumers/src/processors/schedulers/esdc-integration/sin-validation-integration/sin-validation-process-response-integration.scheduler.ts index 4271773ea6..a8464a0b1c 100644 --- a/sources/packages/backend/apps/queue-consumers/src/processors/schedulers/esdc-integration/sin-validation-integration/sin-validation-process-response-integration.scheduler.ts +++ b/sources/packages/backend/apps/queue-consumers/src/processors/schedulers/esdc-integration/sin-validation-integration/sin-validation-process-response-integration.scheduler.ts @@ -8,10 +8,10 @@ import { QueueProcessSummary } from "../../../models/processors.models"; import { BaseScheduler } from "../../base-scheduler"; import { ProcessResponseQueue } from "../models/esdc.models"; -@Processor(QueueNames.SINValidationRequestIntegration) -export class SINValidationRequestIntegrationScheduler extends BaseScheduler { +@Processor(QueueNames.SINValidationResponseIntegration) +export class SINValidationResponseIntegrationScheduler extends BaseScheduler { constructor( - @InjectQueue(QueueNames.SINValidationRequestIntegration) + @InjectQueue(QueueNames.SINValidationResponseIntegration) schedulerQueue: Queue, queueService: QueueService, private readonly sinValidationProcessingService: SINValidationProcessingService, diff --git a/sources/packages/backend/apps/queue-consumers/src/queue-consumers.module.ts b/sources/packages/backend/apps/queue-consumers/src/queue-consumers.module.ts index 281a918a8f..3d14eb68e5 100644 --- a/sources/packages/backend/apps/queue-consumers/src/queue-consumers.module.ts +++ b/sources/packages/backend/apps/queue-consumers/src/queue-consumers.module.ts @@ -8,7 +8,7 @@ import { CRAResponseIntegrationScheduler, CRAProcessIntegrationScheduler, SINValidationProcessIntegrationScheduler, - SINValidationRequestIntegrationScheduler, + SINValidationResponseIntegrationScheduler, StudentLoanBalancesPartTimeIntegrationScheduler, FullTimeMSFAAProcessIntegrationScheduler, PartTimeMSFAAProcessIntegrationScheduler, @@ -114,7 +114,7 @@ import { CASService } from "@sims/integrations/cas/cas.service"; SequenceControlService, WorkflowClientService, SINValidationProcessIntegrationScheduler, - SINValidationRequestIntegrationScheduler, + SINValidationResponseIntegrationScheduler, StudentLoanBalancesPartTimeIntegrationScheduler, FullTimeMSFAAProcessIntegrationScheduler, MSFAANumberService, diff --git a/sources/packages/backend/libs/utilities/src/queue.constant.ts b/sources/packages/backend/libs/utilities/src/queue.constant.ts index 60ad6ec453..b76ad130c5 100644 --- a/sources/packages/backend/libs/utilities/src/queue.constant.ts +++ b/sources/packages/backend/libs/utilities/src/queue.constant.ts @@ -9,7 +9,7 @@ export enum QueueNames { CRAProcessIntegration = "cra-process-integration", CRAResponseIntegration = "cra-response-integration", SINValidationProcessIntegration = "sin-validation-process-integration", - SINValidationRequestIntegration = "sin-validation-request-integration", + SINValidationResponseIntegration = "sin-validation-response-integration", PartTimeMSFAAProcessIntegration = "part-time-msfaa-process-integration", PartTimeECertIntegration = "part-time-e-cert-integration", PartTimeFeedbackIntegration = "part-time-feedback-integration",