2007-01-03 04:39:30 +08:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2006-09-26 21:08:16 +08:00
|
|
|
"""
|
|
|
|
Daily cleanup job.
|
2005-07-13 09:25:57 +08:00
|
|
|
|
2006-09-26 21:08:16 +08:00
|
|
|
Can be run as a cronjob to clean out old data from the database (only expired
|
|
|
|
sessions at the moment).
|
|
|
|
"""
|
2005-07-13 09:25:57 +08:00
|
|
|
|
2012-10-27 17:49:46 +08:00
|
|
|
import warnings
|
|
|
|
|
2008-07-06 14:39:44 +08:00
|
|
|
from django.core import management
|
2005-07-13 09:25:57 +08:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2012-10-27 17:49:46 +08:00
|
|
|
warnings.warn(
|
|
|
|
"The `daily_cleanup` script has been deprecated "
|
|
|
|
"in favor of `django-admin.py clearsessions`.",
|
2012-12-26 04:07:27 +08:00
|
|
|
DeprecationWarning)
|
2012-10-27 17:49:46 +08:00
|
|
|
management.call_command('clearsessions')
|