From 99fcf91043c494e875399f6a85a0d69ab7ab19ad Mon Sep 17 00:00:00 2001 From: Fabio Date: Tue, 14 Feb 2023 11:41:44 -0300 Subject: [PATCH] Bash script check for webservice_url contents --- .../edemocracia/v0.4.0/templates/audienciasweb-cron.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/charts/edemocracia/v0.4.0/templates/audienciasweb-cron.yaml b/charts/edemocracia/v0.4.0/templates/audienciasweb-cron.yaml index 707a77b..a657c14 100644 --- a/charts/edemocracia/v0.4.0/templates/audienciasweb-cron.yaml +++ b/charts/edemocracia/v0.4.0/templates/audienciasweb-cron.yaml @@ -27,10 +27,11 @@ spec: command: [ "/bin/bash", "-c" ] args: - >- - sleep $[RANDOM%120] && - python3 /var/labhacker/audiencias/manage.py get_camara_webservice && - python3 /var/labhacker/audiencias/manage.py prune_rooms && - python3 /var/labhacker/audiencias/manage.py prune_presences + sleep $[RANDOM%120]; + python3 /var/labhacker/audiencias/manage.py prune_rooms; + python3 /var/labhacker/audiencias/manage.py prune_presences; + [[ ! -z "$WEBSERVICE_URL" ]] && + python3 /var/labhacker/audiencias/manage.py get_camara_webservice env: - name: ADMIN_EMAIL value: {{ .Values.edemocracia.admin.email | quote }}