Skip to content

Commit

Permalink
change to check pvc access
Browse files Browse the repository at this point in the history
  • Loading branch information
hannah-macdonald1 committed Feb 2, 2024
1 parent 4d9a693 commit dce797d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions containers/db_cleanup/cleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ function async_pin_output() {

})();

function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}

// Entry deletion function
function delete_entries() {
pg('vhers_audit_log').where('created_at', '<', retainUntilString).delete().then(
Expand All @@ -119,8 +123,8 @@ function delete_entries() {
() => {
vhersClient.end();
pinClient.end();
console.log(`Successfully deleted audit log entries prior to ${retainUntilString}`);
process.exit(0);
sleep(240000).then(() => {console.log(`Successfully deleted audit log entries prior to ${retainUntilString}`);
process.exit(0);})
},
(err) => {
console.log(err);
Expand Down
6 changes: 3 additions & 3 deletions containers/db_cleanup/openshift/templates/db-cleanup-dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ objects:
metadata:
name: db-cleanup-cronjob
spec:
schedule: "30 2 * * SUN"
# schedule: "30 2 * * SUN"
# Different schedule for test purposes
# schedule: "*/5 * * * *"
schedule: "*/5 * * * *"
startingDeadlineSeconds: 200
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
Expand All @@ -89,7 +89,7 @@ objects:
imagePullPolicy: Always
volumeMounts:
- mountPath: "/deleted"
name: deleted
name: output
env: # Use environment variables for Secret values
- name: DB_NAME
valueFrom:
Expand Down

0 comments on commit dce797d

Please sign in to comment.