summaryrefslogtreecommitdiff
path: root/scripts/daily_cleanup.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-12-13 18:08:21 -0600
committerDan McGee <dan@archlinux.org>2009-02-07 11:56:37 -0600
commit33edeb463c305aceb2ce5cec0f234c2d2e66fee0 (patch)
tree90e457323bbeb29d8e2397b28dcbf7f495fa7246 /scripts/daily_cleanup.py
parent8f59fc7c8dd9f8c139c0aed8ba8c7d31d89619b9 (diff)
remove unneeded script
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/daily_cleanup.py')
-rwxr-xr-xscripts/daily_cleanup.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/scripts/daily_cleanup.py b/scripts/daily_cleanup.py
deleted file mode 100755
index fcc5bce5..00000000
--- a/scripts/daily_cleanup.py
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-from django.db import backend, connection, transaction
-""" Daily cleanup file
- This purges the session data that is old from the session table.
-"""
-def clean_up():
- # Clean up old database records
- cursor = connection.cursor()
- cursor.execute("DELETE FROM %s WHERE %s < NOW()" % \
- (backend.quote_name('django_session'), backend.quote_name('expire_date')))
- cursor.execute("OPTIMIZE TABLE %s" % backend.quote_name('django_session'))
- transaction.commit_unless_managed()
-
-if __name__ == "__main__":
- clean_up()