Merge "Fix race condition in compression of static files"
This commit is contained in:
commit
2c2289b09f
|
@ -97,14 +97,18 @@
|
|||
when: item.value.theme_src_archive is defined
|
||||
notify: Restart apache2
|
||||
|
||||
- name: Collect and compress static files
|
||||
command: "{{ item }}"
|
||||
- name: Collect static files
|
||||
command: "{{ horizon_manage }} collectstatic --noinput"
|
||||
become: yes
|
||||
become_user: "{{ horizon_system_user_name }}"
|
||||
changed_when: false
|
||||
notify: Restart apache2
|
||||
|
||||
- name: Compress static files
|
||||
command: "{{ horizon_manage }} compress --force"
|
||||
become: yes
|
||||
become_user: "{{ horizon_system_user_name }}"
|
||||
changed_when: false
|
||||
with_items:
|
||||
- "{{ horizon_manage }} collectstatic --noinput"
|
||||
- "{{ horizon_manage }} compress --force"
|
||||
notify: Restart apache2
|
||||
register: async_compress_static_files
|
||||
async: 600
|
||||
|
|
|
@ -87,16 +87,14 @@
|
|||
# since the original task ran as that user. This task will fail if it is run
|
||||
# as root because the async status file is within the horizon user's home
|
||||
# directory, not root's home directory.
|
||||
- name: Ensure static files are collected and compressed
|
||||
- name: Ensure static files are compressed
|
||||
async_status:
|
||||
jid: "{{ item.ansible_job_id }}"
|
||||
jid: "{{ async_compress_static_files.ansible_job_id }}"
|
||||
become: yes
|
||||
become_user: "{{ horizon_system_user_name }}"
|
||||
register: async_compress_static_files_check
|
||||
until: async_compress_static_files_check.finished
|
||||
retries: 300
|
||||
with_items:
|
||||
- "{{ async_compress_static_files.results }}"
|
||||
tags:
|
||||
- horizon-config
|
||||
|
||||
|
|
Loading…
Reference in New Issue