Skip to content

Commit

Permalink
Update cron jobs to run the database dumps and clean the dumps folder…
Browse files Browse the repository at this point in the history
… if necessary
  • Loading branch information
howard-e committed Jan 8, 2025
1 parent 2b6381f commit fc6d3d0
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions deploy/roles/application/tasks/cron.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
---
# Create a cron to import the most recent tests from aria-at
- name: Set a cron job to build test results
- name: Set a cron job to build and import latest test versions from aria-at
cron:
name: "import latest aria-at tests"
minute: "15"
job: "curl -X POST https://{{fqdn}}/api/test/import"
when: deployment_mode != 'development'
when: deployment_mode != 'development'

- name: Set a cron job to build test results in development
- name: Set a cron job to build and import latest test versions from aria-at in development
cron:
name: "import latest aria-at tests"
minute: "15"
job: "curl -X POST http://localhost:5000/api/test/import"
when: deployment_mode == 'development'

# Create a cron to dump the database in staging and production
- name: Set a cron job to create a new database dump
cron:
name: "create new database dump"
hour: "0"
minute: "0"
job: "curl -X POST https://{{fqdn}}/api/database/dump"
when: deployment_mode == 'staging' or deployment_mode == 'production'

# Create a cron to clean up the database dumps folder in staging and production
- name: Set a cron job to clean up the database dumps folder
cron:
name: "clean up the database dumps folder is necessary"
hour: "0"
minute: "5"
job: "curl -X POST https://{{fqdn}}/api/database/cleanFolder"
when: deployment_mode == 'staging' or deployment_mode == 'production'

0 comments on commit fc6d3d0

Please sign in to comment.