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.
|
2023-05-06 06:41:30 +00:00
|
|
|
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
|
|
|
|
2023-05-06 06:41:30 +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:
|