start work on invite keys
This commit is contained in:
@@ -139,6 +139,11 @@ def bind_default_badges(path):
|
||||
'uploaded_at': int(os.path.getmtime(real_path)),
|
||||
})
|
||||
|
||||
def clear_stale_invites():
|
||||
from .db import db
|
||||
from .util import time_now
|
||||
db.execute('DELETE FROM "invite_keys" WHERE expires_at < ?', time_now())
|
||||
|
||||
def clear_stale_sessions():
|
||||
from .db import db
|
||||
with db.transaction():
|
||||
@@ -234,6 +239,7 @@ def create_app():
|
||||
|
||||
clear_stale_sessions()
|
||||
clear_api_limits()
|
||||
clear_stale_invites()
|
||||
|
||||
reparse_babycode()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user