Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Make the cron frequency adjustable #34

Merged
merged 4 commits into from
Oct 20, 2023
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
6 changes: 6 additions & 0 deletions defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ site_config_dir: sites

# No site information as default
sites: []

cloud_info_cron:
minute: "4,34"
hour: "*"
weekday: "*"
timeout: "600"
8 changes: 4 additions & 4 deletions tasks/cloud-info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
- name: Cloud info cron
ansible.builtin.cron:
name: cloud-info-provider {{ site.gocdb }}
weekday: "*"
minute: "*/12"
hour: "*"
weekday: "{{ cloud_info_cron.weekday }}"
minute: "{{ cloud_info_cron.minute }}"
hour: "{{ cloud_info_cron.hour }}"
user: root
job: >
flock -n -w 250 /var/lock/cloud-info/{{ filename }}
flock -n -w {{ cloud_info_cron.timeout }} /var/lock/cloud-info/{{ filename }}
docker run --rm -v /etc/egi:/etc/egi:ro
--env-file /etc/egi/cloud-info/{{ filename }}.env
{{ cloud_info_image }} >> /var/log/cloud-info/{{ filename }}.log 2>&1
Expand Down