Skip to content

Commit

Permalink
added cronjobs
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunlumbcgov committed Dec 8, 2023
1 parent 682a7fa commit 80f49c5
Showing 1 changed file with 57 additions and 5 deletions.
62 changes: 57 additions & 5 deletions tools/openshift/backend.dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ objects:
metadata:
name: generate-csv-downloads
spec:
schedule: 0 2,14 * * *
schedule: 1,2,3,4 2,14 * * *
jobTemplate:
spec:
template:
Expand All @@ -169,13 +169,65 @@ objects:
args:
- >
curl -X GET
"https://${HOST_ROUTE}/api/v1/download/csv/district/all-mailing?filepath=districtmailing"
"https://${HOST_ROUTE}/api/v1/download/csv/school/all-contacts/ALL?filepath=allschoolcontacts"
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: Always
restartPolicy: OnFailure
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
schedulerName: default-scheduler
- apiVersion: batch/v1
kind: CronJob
metadata:
name: flush-file-cache
spec:
schedule: '50,51,52,53 1,13 * * *'
jobTemplate:
spec:
template:
spec:
containers:
- name: api-request
image: alpine/curl
command:
- /bin/sh
- "-c"
args:
- >
curl -X GET
"https://${HOST_ROUTE}/api/v1/download/csv/district/all-contacts?filepath=districtcontacts"
"https://${HOST_ROUTE}/api/v1/download/flush-cache/a1e6f7b3c8d2e9a0b5d7c1e0f3c4b9a1"
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: Always
restartPolicy: OnFailure
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
schedulerName: default-scheduler
- apiVersion: batch/v1
kind: CronJob
metadata:
name: create-cache-schools
spec:
schedule: '55,56,57,58 1,13 * * *'
jobTemplate:
spec:
template:
spec:
containers:
- name: api-request
image: alpine/curl
command:
- /bin/sh
- "-c"
args:
- >
curl -X GET
"https://${HOST_ROUTE}/api/v1/download/csv/school/all-contacts/PUBLIC?filepath=publicschoolcontacts"
"https://${HOST_ROUTE}/api/v1/institute/create-cache"
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
Expand All @@ -184,7 +236,7 @@ objects:
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
schedulerName: default-scheduler
schedulerName: default-scheduler
parameters:
- name: REPO_NAME
description: Application repository name
Expand Down

0 comments on commit 80f49c5

Please sign in to comment.