Workout With Friends
Stay fit with a little motivation
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Properties
wowf
scripts
cleanup.py
Go to the documentation of this file.
1
import
transaction
2
from
wowf.lib.utils
import
get_subclasses
3
from
wowf.models
import
tokens
4
from
wowf.scripts
import
BaseCommand, make_main
5
6
7
class
CleanupCommand
(
BaseCommand
):
8
9
def
run
(self):
10
transaction.begin()
11
self.
delete_expired_tokens
()
12
transaction.commit()
13
14
def
delete_expired_tokens
(self):
15
for
cls
in
get_subclasses
(tokens, tokens.Token):
16
cls.delete_expired()
17
18
19
main =
make_main
(CleanupCommand)
20
Generated on Sat Dec 15 2012 14:59:09 for Workout With Friends by
1.8.1.2