Skip to content

Commit

Permalink
Adjust for recent gravity changes
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Jan 5, 2023
1 parent 9d70b2e commit f50524d
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/molecule.yml
Expand Up @@ -25,6 +25,7 @@ jobs:
- '21.01'
- '22.01'
- '22.05'
- '23.0'
exclude:
# wheels often don't exist in the combination of old package versions in older galaxy releases for newer
# python versions in newer operating systems; nobody should be installing an old galaxy on a new os anyway, so
Expand Down
14 changes: 14 additions & 0 deletions handlers/gravity_22.05.yml
@@ -0,0 +1,14 @@
---
# handlers for gravity as used in galaxy version 22.05

- name: galaxy gravity restart
command: "{{ galaxy_venv_dir }}/bin/galaxyctl graceful"
environment:
GRAVITY_STATE_DIR: "{{ galaxy_gravity_state_dir }}"
listen: "restart galaxy"

- name: galaxyctl update
command: "{{ galaxy_venv_dir }}/bin/galaxyctl update"
environment:
GRAVITY_STATE_DIR: "{{ galaxy_gravity_state_dir }}"
listen: "galaxyctl update"
14 changes: 14 additions & 0 deletions handlers/gravity_23.0.yml
@@ -0,0 +1,14 @@
---
# handlers for gravity as used in galaxy version 23.0

- name: galaxy gravity restart
command: "{{ galaxy_venv_dir }}/bin/galaxyctl -c {{ galaxy_config_file }} graceful"
environment:
GRAVITY_STATE_DIR: "{{ galaxy_gravity_state_dir }}"
listen: "restart galaxy"

- name: galaxyctl update
command: "{{ galaxy_venv_dir }}/bin/galaxyctl -c {{ galaxy_config_file }} update"
environment:
GRAVITY_STATE_DIR: "{{ galaxy_gravity_state_dir }}"
listen: "galaxyctl update"
19 changes: 8 additions & 11 deletions handlers/main.yml
Expand Up @@ -22,15 +22,12 @@
when: "galaxy_systemd_mode == 'mule' and galaxy_manage_systemd"
listen: "restart galaxy"

- name: galaxy gravity restart
command: "{{ galaxy_venv_dir }}/bin/galaxyctl graceful"
environment:
GRAVITY_STATE_DIR: "{{ galaxy_gravity_state_dir }}"
when: "galaxy_systemd_mode == 'gravity' and galaxy_manage_systemd"
listen: "restart galaxy"
- name: Include Gravity handlers (for 22.05)
import_tasks:
file: gravity_22.05.yml
when: "galaxy_systemd_mode == 'gravity' and galaxy_manage_systemd and __galaxy_major_version is version('23.0', '<')"

- name: galaxyctl update
command: "{{ galaxy_venv_dir }}/bin/galaxyctl update"
environment:
GRAVITY_STATE_DIR: "{{ galaxy_gravity_state_dir }}"
when: "galaxy_systemd_mode == 'gravity'"
- name: Include Gravity handlers (for 23.0)
import_tasks:
file: gravity_23.0.yml
when: "galaxy_systemd_mode == 'gravity' and galaxy_manage_systemd and __galaxy_major_version is version('23.0', '>=')"
8 changes: 8 additions & 0 deletions tasks/gravity.yml
Expand Up @@ -8,11 +8,19 @@
command: "{{ galaxy_venv_dir }}/bin/galaxyctl register {{ galaxy_config_file }}"
args:
creates: "{{ galaxy_gravity_state_dir }}/configstate.yaml"
when: __galaxy_major_version is version('23.0', '<')

- name: Update Gravity process management files
command: "{{ galaxy_venv_dir }}/bin/galaxyctl update"
args:
creates: "{{ galaxy_gravity_state_dir }}/supervisor/supervisord.conf.d"
when: __galaxy_major_version is version('23.0', '<')

- name: Update Gravity process management files
command: "{{ galaxy_venv_dir }}/bin/galaxyctl -c {{ galaxy_config_file }} update"
args:
creates: "{{ galaxy_gravity_state_dir }}/supervisor/supervisord.conf.d"
when: __galaxy_major_version is version('23.0', '>=')

environment:
GRAVITY_STATE_DIR: "{{ galaxy_gravity_state_dir }}"
Expand Down

0 comments on commit f50524d

Please sign in to comment.