symposion_app/deploy/cron/cron.daily

18 lines
546 B
Text
Raw Normal View History

2023-05-02 06:31:09 +00:00
#!/bin/bash
export DJANGO_SETTINGS_MODULE={{ env.settings }}
set -a
source {{ env.project_dir }}/env
# PYTHONPATH variable is not preserved by sudo.
# Clear out expired Django sessions.
cronic sudo --user={{ env.app_user }} --preserve-env PYTHONPATH={{ env.project_dir }}:$PYTHONPATH {{ env.virtualenv }}/bin/django-admin clearsessions
2023-05-02 06:31:09 +00:00
cronic sudo --user={{ env.app_user }} --preserve-env PYTHONPATH={{ env.project_dir }}:$PYTHONPATH {{ env.virtualenv }}/bin/django-admin expunge_deleted
2023-05-02 06:31:09 +00:00
# Local Variables:
# mode: shell-script-mode
# End: