Browse Source

New audiencias-cron script

master
Fábio Kaiser Rauber 2 years ago
parent
commit
d81f5e64cd
  1. 14
      charts/edemocracia/v0.4.0/templates/audienciasweb-cron.yaml

14
charts/edemocracia/v0.4.0/templates/audienciasweb-cron.yaml

@ -27,11 +27,15 @@ spec:
command: [ "/bin/bash", "-c" ] command: [ "/bin/bash", "-c" ]
args: args:
- >- - >-
sleep $[RANDOM%120]; TIME=$[RANDOM%120];
python3 /var/labhacker/audiencias/manage.py prune_rooms; echo Sleeping $TIME seconds...;
python3 /var/labhacker/audiencias/manage.py prune_presences; sleep $TIME;
[[ ! -z "$WEBSERVICE_URL" ]] && echo Running prune_rooms... && python3 /var/labhacker/audiencias/manage.py prune_rooms;
python3 /var/labhacker/audiencias/manage.py get_camara_webservice echo Running prune_presences... && python3 /var/labhacker/audiencias/manage.py prune_presences;
if [[ ! -z "$WEBSERVICE_URL" ]]; then
echo Running get_camara_webservice... &&
python3 /var/labhacker/audiencias/manage.py get_camara_webservice;
fi;
env: env:
- name: ADMIN_EMAIL - name: ADMIN_EMAIL
value: {{ .Values.edemocracia.admin.email | quote }} value: {{ .Values.edemocracia.admin.email | quote }}

Loading…
Cancel
Save