From 636f09a6d7f8b763d7123f3977e80a0463b932d6 Mon Sep 17 00:00:00 2001 From: chelsea-EYDS Date: Fri, 10 Jan 2025 20:22:34 -0800 Subject: [PATCH 1/3] updated cron jobs --- backend/src/jobs/end_recommitment.ts | 8 ++++---- openshift/cron-end-recommitment.yml | 7 +++---- openshift/cron-notifications.yml | 9 ++++----- openshift/cron-start-recommitment.yml | 6 +++--- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/backend/src/jobs/end_recommitment.ts b/backend/src/jobs/end_recommitment.ts index 538d7053..bb5981cd 100644 --- a/backend/src/jobs/end_recommitment.ts +++ b/backend/src/jobs/end_recommitment.ts @@ -54,17 +54,17 @@ import { datePST } from '../common/helpers'; ); logger.log('Supervisor TEST emails:', 'Recommitment'); - logger.log(`TxId: ${data.supervisor.txId}`, 'Recommitment'); + logger.log(`TxId: ${data?.supervisor?.txId}`, 'Recommitment'); data.supervisor?.messages?.forEach((supervisor) => { - logger.log(`Supervisor: ${supervisor.to}`, 'Recommitment'); + logger.log(`Supervisor: ${supervisor?.to}`, 'Recommitment'); }); logger.log('Member TEST emails:', 'Recommitment'); - logger.log(`TxId: ${data.member.txId}`, 'Recommitment'); + logger.log(`TxId: ${data?.member?.txId}`, 'Recommitment'); data.member?.messages?.forEach((member) => { - logger.log(`Member: ${member.to}`, 'Recommitment'); + logger.log(`Member: ${member?.to}`, 'Recommitment'); }); logger.log('Recommitment job completed', 'Recommitment'); diff --git a/openshift/cron-end-recommitment.yml b/openshift/cron-end-recommitment.yml index 0c70eba1..f329841c 100644 --- a/openshift/cron-end-recommitment.yml +++ b/openshift/cron-end-recommitment.yml @@ -30,9 +30,9 @@ objects: name: ${APP_NAME}-cronjob-end-recommitment spec: schedule: ${END_RECOMMITMENT_SCHEDULE} - concurrencyPolicy: Replace + concurrencyPolicy: 'Replace' startingDeadlineSeconds: 10 - successfulJobsHistoryLimit: 3 + successfulJobsHistoryLimit: 1 failedJobsHistoryLimit: 1 jobTemplate: spec: @@ -41,7 +41,6 @@ objects: labels: parent: 'cronjobpi' spec: - activeDeadlineSeconds: 450 restartPolicy: OnFailure containers: - name: ${APP_NAME}-cron-end-recommitment @@ -49,7 +48,7 @@ objects: image: image-registry.openshift-image-registry.svc:5000/${IMAGE_NAMESPACE}/${APP_NAME}-server:${IMAGE_TAG} resources: limits: - cpu: 20m + cpu: 40m memory: 256Mi requests: cpu: 10m diff --git a/openshift/cron-notifications.yml b/openshift/cron-notifications.yml index b8baf924..e9b94cf5 100644 --- a/openshift/cron-notifications.yml +++ b/openshift/cron-notifications.yml @@ -30,13 +30,12 @@ objects: name: ${APP_NAME}-cronjob-notifications spec: schedule: ${NOTIFICATION_SCHEDULE} - concurrencyPolicy: Replace + concurrencyPolicy: 'Replace' startingDeadlineSeconds: 10 - successfulJobsHistoryLimit: 3 + successfulJobsHistoryLimit: 1 failedJobsHistoryLimit: 1 jobTemplate: spec: - activeDeadlineSeconds: 450 template: metadata: labels: @@ -47,10 +46,10 @@ objects: containers: - name: ${APP_NAME}-cron-notifications restartPolicy: OnFailure - image: image-registry.openshift-image-registry.svc:5000/${IMAGE_NAMESPACE}/${APP_NAME}-server:${IMAGE_TAG} + image: image-registry.openshift-image-registry.svc:5000/${IMAGE_NAMESPACE}/${APP_NAME}-server:dev resources: limits: - cpu: 20m + cpu: 30m memory: 256Mi requests: cpu: 10m diff --git a/openshift/cron-start-recommitment.yml b/openshift/cron-start-recommitment.yml index 6b90686f..a917c635 100644 --- a/openshift/cron-start-recommitment.yml +++ b/openshift/cron-start-recommitment.yml @@ -30,7 +30,7 @@ objects: name: ${APP_NAME}-cronjob-start-recommitment spec: schedule: ${START_RECOMMITMENT_SCHEDULE} - concurrencyPolicy: Replace + concurrencyPolicy: 'Replace' startingDeadlineSeconds: 10 successfulJobsHistoryLimit: 3 failedJobsHistoryLimit: 1 @@ -46,10 +46,10 @@ objects: containers: - name: ${APP_NAME}-cron-start-recommitment restartPolicy: OnFailure - image: image-registry.openshift-image-registry.svc:5000/${IMAGE_NAMESPACE}/${APP_NAME}-server:${IMAGE_TAG} + image: image-registry.openshift-image-registry.svc:5000/${IMAGE_NAMESPACE}/${APP_NAME}-server:dev resources: limits: - cpu: 20m + cpu: 40m memory: 256Mi requests: cpu: 10m From a8b8cc0b0dc81df6c909b99b5f8d18205c5f4d09 Mon Sep 17 00:00:00 2001 From: chelsea-EYDS Date: Fri, 10 Jan 2025 20:32:16 -0800 Subject: [PATCH 2/3] added back template blocks --- backend/src/views/blocks/parqcopy.njk | 4 ++++ backend/src/views/blocks/resourcescopy.njk | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 backend/src/views/blocks/parqcopy.njk create mode 100644 backend/src/views/blocks/resourcescopy.njk diff --git a/backend/src/views/blocks/parqcopy.njk b/backend/src/views/blocks/parqcopy.njk new file mode 100644 index 00000000..305fa9d1 --- /dev/null +++ b/backend/src/views/blocks/parqcopy.njk @@ -0,0 +1,4 @@ +

If you plan to recommit to BCWS:

+

You can now directly fill in your PAR-Q+ response as part of the recommitment process in your dashboard. Your PAR-Q+ responses will NOT be recorded; you must download your response once completed and email it to your Fire Centre. If you have any concerns about your health conditions that may affect your deployment in the upcoming year, please inform your CORE coordinator.

+ +

To complete the PAR-Q+, you must have a witness signature. Please make sure you have found someone to be your witness before starting recommitment.

\ No newline at end of file diff --git a/backend/src/views/blocks/resourcescopy.njk b/backend/src/views/blocks/resourcescopy.njk new file mode 100644 index 00000000..670fba49 --- /dev/null +++ b/backend/src/views/blocks/resourcescopy.njk @@ -0,0 +1,10 @@ + + +

For more information, please visit:

+ + + From 574f1c0d74e3e80cb84c353391a6d4b544b58682 Mon Sep 17 00:00:00 2001 From: chelsea-EYDS Date: Fri, 10 Jan 2025 20:32:38 -0800 Subject: [PATCH 3/3] added back template blocks --- backend/src/views/blocks/{parqcopy.njk => parq.njk} | 0 backend/src/views/blocks/{resourcescopy.njk => resources.njk} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename backend/src/views/blocks/{parqcopy.njk => parq.njk} (100%) rename backend/src/views/blocks/{resourcescopy.njk => resources.njk} (100%) diff --git a/backend/src/views/blocks/parqcopy.njk b/backend/src/views/blocks/parq.njk similarity index 100% rename from backend/src/views/blocks/parqcopy.njk rename to backend/src/views/blocks/parq.njk diff --git a/backend/src/views/blocks/resourcescopy.njk b/backend/src/views/blocks/resources.njk similarity index 100% rename from backend/src/views/blocks/resourcescopy.njk rename to backend/src/views/blocks/resources.njk