aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/web.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-08-06 23:09:38 -0700
committerBryan Newbold <bnewbold@archive.org>2020-08-06 23:09:38 -0700
commit2c681e32756538c84b292cc95b623ee9758846a6 (patch)
tree7a1282fde76f49d62d3efd02cfa2c4602e2d2445 /fatcat_scholar/web.py
parent4eb2fc1dc2e6c358f79bf58f080afa6511b2c8f0 (diff)
downloadfatcat-scholar-2c681e32756538c84b292cc95b623ee9758846a6.tar.gz
fatcat-scholar-2c681e32756538c84b292cc95b623ee9758846a6.zip
don't print config; make fmt
Diffstat (limited to 'fatcat_scholar/web.py')
-rw-r--r--fatcat_scholar/web.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/fatcat_scholar/web.py b/fatcat_scholar/web.py
index 80cc2b1..4110ddb 100644
--- a/fatcat_scholar/web.py
+++ b/fatcat_scholar/web.py
@@ -14,7 +14,7 @@ from typing import Optional, Any
from fatcat_scholar.hacks import Jinja2Templates
from fatcat_scholar.search import do_fulltext_search, FulltextQuery, FulltextHits
-print(f"dynaconf settings: {settings.as_dict()}", file=sys.stderr)
+# print(f"dynaconf settings: {settings.as_dict()}", file=sys.stderr)
I18N_LANG_TRANSLATIONS = ["de", "zh"]
I18N_LANG_OPTIONS = I18N_LANG_TRANSLATIONS + [
@@ -177,9 +177,13 @@ async def web_search(
headers = dict()
if hits and hits.query_wall_time_ms:
- headers["Server-Timing"] = f'es_wall;desc="Search API Request";dur={hits.query_wall_time_ms}'
+ headers[
+ "Server-Timing"
+ ] = f'es_wall;desc="Search API Request";dur={hits.query_wall_time_ms}'
if hits.query_time_ms:
- headers["Server-Timing"] += f', es;desc="Search Internal Time";dur={hits.query_time_ms}'
+ headers[
+ "Server-Timing"
+ ] += f', es;desc="Search Internal Time";dur={hits.query_time_ms}'
return i18n_templates[lang.code].TemplateResponse(
"search.html",
{