aboutsummaryrefslogtreecommitdiffstats
path: root/script/delete-old-sessions
diff options
context:
space:
mode:
authorfrancis <francis>2008-02-12 11:42:09 +0000
committerfrancis <francis>2008-02-12 11:42:09 +0000
commit2c93b06b7676fb7339baf1fd0ed30f2ca466206d (patch)
tree656ef0006b6446a6e4ca00e41e9c2a65fb6f0061 /script/delete-old-sessions
parent1ddb79d6f180581a75895db8d9cd8890cef7cf3d (diff)
Delete old sessions and post redirects.
Diffstat (limited to 'script/delete-old-sessions')
-rwxr-xr-xscript/delete-old-sessions8
1 files changed, 8 insertions, 0 deletions
diff --git a/script/delete-old-sessions b/script/delete-old-sessions
new file mode 100755
index 000000000..0e4c91122
--- /dev/null
+++ b/script/delete-old-sessions
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+LOC=`dirname $0`
+
+$LOC/runner 'PostRedirect.delete_old_post_redirects()'
+$LOC/runner "ActiveRecord::Base.connection.execute(\"delete from sessions where now() - updated_at > '1 month'\")"
+
+