Commit adceca12 authored by Hiro's avatar Hiro 🏄
Browse files

Update how stats table is updated

parent 1f016f1f
......@@ -90,10 +90,10 @@ class SQLite3(object):
now_str = datetime.now().strftime("%Y%m%d")
query = "REPLACE INTO stats(num_requests, platform, language, "\
"command, service, date) VALUES(COALESCE((SELECT num_requests FROM stats "\
"WHERE date=?)+1, 0), ?, ?, ?, ?, ?) "\
"WHERE platform=? AND language=? AND date=?)+1, 0), ?, ?, ?, ?, ?) "\
return self.dbpool.runQuery(
query, (now_str, platform, language, command, service, now_str)
query, (platform, language, now_str, platform, language, command, service, now_str)
).addCallback(self.query_callback).addErrback(self.query_errback)
def get_links(self, platform, language, status):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment