Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Cecylia Bocovich
gettor
Commits
adceca12
Commit
adceca12
authored
May 23, 2019
by
Hiro
🏄
Browse files
Update how stats table is updated
parent
1f016f1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
gettor/utils/db.py
View file @
adceca12
...
...
@@ -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
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment