Skip to content

Commit

Permalink
[FIX] updated cron jobs (#419)
Browse files Browse the repository at this point in the history
* updated cron jobs

* added back template blocks

* added back template blocks
  • Loading branch information
chelsea-EYDS authored Jan 13, 2025
1 parent 188de49 commit f94f47c
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 16 deletions.
8 changes: 4 additions & 4 deletions backend/src/jobs/end_recommitment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 4 additions & 0 deletions backend/src/views/blocks/parq.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<p><span>If you plan to recommit to BCWS:</span></p>
<p>You can now directly fill in your PAR-Q+ response as part of the recommitment process in your dashboard. <span>Your PAR-Q+ responses will NOT be recorded; you must download your response once completed and email it to your Fire Centre.</span> If you have any concerns about your health conditions that may affect your deployment in the upcoming year, please inform your CORE coordinator.</p>

<p>To complete the PAR-Q+, <span>you must have a witness signature.</span> Please make sure you have found someone to be your witness before starting recommitment.</p>
10 changes: 10 additions & 0 deletions backend/src/views/blocks/resources.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@


<p>For more information, please visit: </p>
<ul>
<li><a href="https://intranet.gov.bc.ca/emcr/employees-workplace/hr/core-team">BCWS CORE Team</a></li>
<li><a href="https://intranet.gov.bc.ca/bcws/core-team">EMCR CORE Team</a></li>
<li><a href="https://bcdevex.atlassian.net/wiki/spaces/EA/pages/1638694919/Supervisor+User+Manual">Supervisor Manual</a></li>
</ul>


7 changes: 3 additions & 4 deletions openshift/cron-end-recommitment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -41,15 +41,14 @@ objects:
labels:
parent: 'cronjobpi'
spec:
activeDeadlineSeconds: 450
restartPolicy: OnFailure
containers:
- name: ${APP_NAME}-cron-end-recommitment
restartPolicy: OnFailure
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
Expand Down
9 changes: 4 additions & 5 deletions openshift/cron-notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions openshift/cron-start-recommitment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit f94f47c

Please sign in to comment.