cleanup old challanges
This commit is contained in:
parent
417d4d66a1
commit
b738896882
1 changed files with 2 additions and 1 deletions
|
|
@ -27,7 +27,8 @@ def get_challenge(db, path):
|
|||
|
||||
def add_challenge(db, path, value):
|
||||
c = db.cursor()
|
||||
c.execute('REPLACE INTO challenges (q, value) VALUES(?, ?)', (path,value,))
|
||||
c.execute('INSERT INTO challenges (q, value) VALUES(?, ?)', (path,value,))
|
||||
c.execute("DELETE FROM challenges WHERE timestamp < strftime('%s', datetime('now','-2 day'))")
|
||||
db.commit()
|
||||
|
||||
def main_query():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue