Skip to content

Commit

Permalink
Merge pull request #468 from ksuderman/408-maintenance-enable
Browse files Browse the repository at this point in the history
Add enable flag to cron jobs
  • Loading branch information
nuwang authored Apr 20, 2024
2 parents 2e32eac + bbdbdb9 commit eedf472
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions galaxy/templates/cronjob-maintenance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ metadata:
labels:
{{- include "galaxy.labels" $ | nindent 4 }}
spec:
{{- if $cronjob.enabled }}
schedule: {{ $cronjob.schedule | quote }}
{{- else }}
# Set an impossible date so that the cronjob is still defined, but effectively disabled.
# This will allow the cronjob to be run manually if needed.
schedule: "0 0 30 2 *"
{{- end }}
jobTemplate:
spec:
template:
Expand Down
2 changes: 2 additions & 0 deletions galaxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ cronJobs:
#- Runs the maintenance.sh script to purge items in the Galaxy database that
#- have been flagged as deleted.
maintenance:
enabled: true
schedule: "5 2 * * *"
extraSettings:
#- Purge items older than this.
Expand All @@ -287,6 +288,7 @@ cronJobs:
- "{{ tpl .Values.cronJobs.maintenance.extraSettings.days $ }}"
#- Remove files from the tmp directory that are older than the allowable wall time for a job
tmpdir:
enabled: true
schedule: "15 2 * * *"
extraSettings:
lastModified: '{{ index .Values "configs" "job_conf.yml" "runners" "k8s" "k8s_walltime_limit" | default 604800 }}'
Expand Down

0 comments on commit eedf472

Please sign in to comment.