diff --git a/tools/openshift/backend.dc.yaml b/tools/openshift/backend.dc.yaml index d2a09c7..f81645a 100644 --- a/tools/openshift/backend.dc.yaml +++ b/tools/openshift/backend.dc.yaml @@ -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: @@ -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 @@ -184,7 +236,7 @@ objects: terminationGracePeriodSeconds: 30 dnsPolicy: ClusterFirst securityContext: {} - schedulerName: default-scheduler + schedulerName: default-scheduler parameters: - name: REPO_NAME description: Application repository name