-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
# Update the Scheduler Cron Configuration ## Updated scheduler Cron As per the ticket, the scheduler cron values have been updated after converting the given PST time in the ticket to UTC time. | Scheduler | PST TIME | UTC TIME | CRON EXPRESSION | | ------------------------------------------------ | -------- | -------- | --------------------- | | ier12-integration | \- | \- | `15/30 * * * *` | | | | | | | cra-process-integration | 21:00 | 05:00 | `0 5 * * *` | | cra-response-integration | 08:00 | 16:00 | `0 16 * * *` | | | | | | | sin-validation-process-integration | 06:00 | 14:00 | `0 14 * * *` | | sin-validation-response-integration | 06:00 | 14:00 | `0 14 * * *` | | | | | | | part-time-msfaa-process-integration | 00:00 | 08:00 | `0 8 * * *` | | | | | | | part-time-e-cert-integration | 00:00 | 08:00 | `0 8 * * *` | | part-time-feedback-integration | 04:00 | 12:00 | `0 12 * * *` | | | | | | | full-time-msfaa-integration | 01:00 | 09:00 | `0 9 * * *` | | | | | | | full-time-e-cert-integration | 22:00 | 06:00 | `0 6 * * *` | | full-time-feedback-integration | 12:00 | 20:00 | `0 20 * * *` | | | | | | | federal-restrictions-integration | 05:00 | 13:00 | `0 13 * * *` | | | | | | | full-time-disbursement-receipts-file-integration | 10:30 | 18:30 | `30 18 * * *` | | | | | | | ece-process-integration | 22:00 | 06:00 | `0 6 * * *` | | ece-process-response-integration | 01:45 | 09:45 | `45 09 * * *` | | | | | | | part-time-msfaa-process-response-integration | 04:00 | 12:00 | `0 12 * * *` | | full-time-msfaa-process-response-integration | 09:15 | 17:15 | `15 17 * * *` | | | | | | | student-loan-balances-part-time-integration | 22:30 | 06:30 | `30 6 * * *` | | sfas-integration | - | - | `15/30 * * * *` | ## Existing cron ![image](https://github.com/user-attachments/assets/29f131ec-5019-485d-8121-0731424f4a7c) ## PR Highlights - [x] Updated a particular property of JSONB column using `jsonb_set` ![image](https://github.com/user-attachments/assets/0c03d9c5-f285-4404-b6f9-e149a94c7a50) - [x] SIN validation response processing was using the queue name `sin-validation-request-integration` and respective scheduler name. Both queue names and scheduler names have been updated. ## Migration Rollback ![image](https://github.com/user-attachments/assets/a331eacc-9f6e-4e12-832e-9610948caeca) ![image](https://github.com/user-attachments/assets/bc357a72-a8c0-4945-b4e0-c054ff1c7c9f) ![image](https://github.com/user-attachments/assets/176312d6-35c9-4dd0-8395-747e4c19d731)
- Loading branch information
1 parent
1cdadda
commit c3e1405
Showing
9 changed files
with
514 additions
and
6 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...ckend/apps/db-migrations/src/migrations/1724722614598-UpdateConfigurationSchedulerCron.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<void> { | ||
await queryRunner.query( | ||
getSQLFileData("Update-configuration-scheduler-cron.sql", "Queue"), | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
getSQLFileData( | ||
"Rollback-update-configuration-scheduler-cron.sql", | ||
"Queue", | ||
), | ||
); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...nd/apps/db-migrations/src/migrations/1724724771391-UpdateQueueNameSINValidationRequest.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<void> { | ||
await queryRunner.query( | ||
getSQLFileData("Update-queue-name-sin-validation-request.sql", "Queue"), | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
getSQLFileData( | ||
"Rollback-update-queue-name-sin-validation-request.sql", | ||
"Queue", | ||
), | ||
); | ||
} | ||
} |
227 changes: 227 additions & 0 deletions
227
...backend/apps/db-migrations/src/sql/Queue/Rollback-update-configuration-scheduler-cron.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'; |
6 changes: 6 additions & 0 deletions
6
...nd/apps/db-migrations/src/sql/Queue/Rollback-update-queue-name-sin-validation-request.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
update | ||
sims.queue_configurations | ||
set | ||
queue_name = 'sin-validation-request-integration' | ||
where | ||
queue_name = 'sin-validation-response-integration'; |
Oops, something went wrong.