datatracker/django/bin/daily_cleanup.py
Henrik Levkowetz 028b7e315a Reverted to [9025] because commit [9026] failed (it was incomplete with a broken working dir).
- Legacy-Id: 9027
Note: SVN reference [9026] has been migrated to Git commit 4a3749a66b
2015-02-08 20:03:16 +00:00

20 lines
441 B
Python
Executable file

#!/usr/bin/env python
"""
Daily cleanup job.
Can be run as a cronjob to clean out old data from the database (only expired
sessions at the moment).
"""
import warnings
from django.core import management
if __name__ == "__main__":
warnings.warn(
"The `daily_cleanup` script has been deprecated "
"in favor of `django-admin.py clearsessions`.",
DeprecationWarning)
management.call_command('clearsessions')