From 33edeb463c305aceb2ce5cec0f234c2d2e66fee0 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 13 Dec 2008 18:08:21 -0600 Subject: remove unneeded script Signed-off-by: Dan McGee --- scripts/daily_cleanup.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100755 scripts/daily_cleanup.py (limited to 'scripts/daily_cleanup.py') diff --git a/scripts/daily_cleanup.py b/scripts/daily_cleanup.py deleted file mode 100755 index fcc5bce..0000000 --- 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() -- cgit v1.2.3-24-g4f1b