Commit 336a4181 authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team
Browse files

controllers/patient.py: patient/custom, log message includes time taken

parent d57b4795
# coding: utf8
import gluon.contrib.simplejson, datetime
import vidjil_utils
import time
if request.env.http_origin:
response.headers['Access-Control-Allow-Origin'] = request.env.http_origin
response.headers['Access-Control-Allow-Credentials'] = 'true'
......@@ -116,6 +118,8 @@ def info():
def custom():
start = time.time()
if request.vars["config_id"] and request.vars["config_id"] != "-1" :
config_id = long(request.vars["config_id"])
config_name = db.config[request.vars["config_id"]].name
......@@ -167,8 +171,7 @@ def custom():
if config :
query = query.find(lambda row : ( row.results_file.config_id==config_id or (str(row.results_file.id) in request.vars["custom_list"])) )
res = {"message": "custom list (%s)" % config_name}
log.debug(res)
log.debug("patient/custom (%.3fs) %s" % (time.time()-start, request.vars["filter"]))
return dict(query=query,
config_id=config_id,
......@@ -178,7 +181,6 @@ def custom():
STATS_READLINES = 1000 # approx. size in which the stats are searched
def stats():
import time
start = time.time()
d = custom()
......@@ -268,8 +270,6 @@ def stats():
## return patient list
def index():
import time
start = time.time()
if not auth.user :
res = {"redirect" : URL('default', 'user', args='login', scheme=True, host=True,
......
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