Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] updated cron jobs #419

Merged
merged 4 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading