From f9ca8e1d449bfd6f8e1b82f441b7b487cefd2ed3 Mon Sep 17 00:00:00 2001 From: nuwang <2070605+nuwang@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:48:02 +0530 Subject: [PATCH] Use gxadmin for cleanup --- roles/galaxy-pg-cleanup/tasks/main.yml | 9 +-------- .../galaxy-pg-cleanup/templates/run_cleanup.sh.j2 | 14 -------------- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 roles/galaxy-pg-cleanup/templates/run_cleanup.sh.j2 diff --git a/roles/galaxy-pg-cleanup/tasks/main.yml b/roles/galaxy-pg-cleanup/tasks/main.yml index c06bef8b1..711d345c9 100644 --- a/roles/galaxy-pg-cleanup/tasks/main.yml +++ b/roles/galaxy-pg-cleanup/tasks/main.yml @@ -1,10 +1,3 @@ -- name: Template run_cleanup.sh script - template: - src: run_cleanup.sh.j2 - dest: /home/galaxy/run_cleanup.sh - mode: "744" - owner: galaxy - group: galaxy - name: Add cron job for galaxy cron: name: "galaxy_pg_cleanup" @@ -12,4 +5,4 @@ weekday: "{{ galaxy_pg_cleanup_cron_weekday }}" hour: "{{ galaxy_pg_cleanup_cron_hour }}" minute: "00" - job: bash /home/galaxy/run_cleanup.sh 2>> /home/galaxy/pgcleanup.log + job: gxadmin cleanup 10 diff --git a/roles/galaxy-pg-cleanup/templates/run_cleanup.sh.j2 b/roles/galaxy-pg-cleanup/templates/run_cleanup.sh.j2 deleted file mode 100644 index a2556150d..000000000 --- a/roles/galaxy-pg-cleanup/templates/run_cleanup.sh.j2 +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -cd {{ galaxy_server_dir }} - -. {{ galaxy_venv_dir }}/bin/activate - -python ./scripts/cleanup_datasets/pgcleanup.py -o 10 -c {{ galaxy_config_dir }}/galaxy.yml delete_userless_histories -python ./scripts/cleanup_datasets/pgcleanup.py -o 10 -c {{ galaxy_config_dir }}/galaxy.yml delete_exported_histories -python ./scripts/cleanup_datasets/pgcleanup.py -o 10 -c {{ galaxy_config_dir }}/galaxy.yml purge_deleted_histories -python ./scripts/cleanup_datasets/pgcleanup.py -o 10 -c {{ galaxy_config_dir }}/galaxy.yml purge_deleted_hdas -python ./scripts/cleanup_datasets/pgcleanup.py -o 10 -c {{ galaxy_config_dir }}/galaxy.yml purge_historyless_hdas -python ./scripts/cleanup_datasets/pgcleanup.py -o 10 -c {{ galaxy_config_dir }}/galaxy.yml purge_hdas_of_purged_histories -python ./scripts/cleanup_datasets/pgcleanup.py -o 10 -c {{ galaxy_config_dir }}/galaxy.yml delete_datasets -python ./scripts/cleanup_datasets/pgcleanup.py -o 10 -c {{ galaxy_config_dir }}/galaxy.yml purge_datasets \ No newline at end of file