mirror of
https://github.com/JonathanHerrewijnen/calibre-web.git
synced 2024-11-11 05:33:57 +00:00
Removed timelogging on metadata search
This commit is contained in:
parent
d1e6a85803
commit
4d92d7da3a
@ -104,15 +104,11 @@ def metadata_search():
|
|||||||
data = list()
|
data = list()
|
||||||
active = current_user.view_settings.get('metadata', {})
|
active = current_user.view_settings.get('metadata', {})
|
||||||
if query:
|
if query:
|
||||||
a = datetime.datetime.now()
|
|
||||||
static_cover = url_for('static', filename='generic_cover.jpg')
|
static_cover = url_for('static', filename='generic_cover.jpg')
|
||||||
with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor:
|
with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor:
|
||||||
meta = {executor.submit(c.search, query, static_cover): c for c in cl if active.get(c.__id__, True)}
|
meta = {executor.submit(c.search, query, static_cover): c for c in cl if active.get(c.__id__, True)}
|
||||||
for future in concurrent.futures.as_completed(meta):
|
for future in concurrent.futures.as_completed(meta):
|
||||||
data.extend(future.result())
|
data.extend(future.result())
|
||||||
b = datetime.datetime.now()
|
|
||||||
c = b - a
|
|
||||||
log.info(c.total_seconds())
|
|
||||||
return Response(json.dumps(data), mimetype='application/json')
|
return Response(json.dumps(data), mimetype='application/json')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user