1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-24 02:27:22 +00:00

Removed timelogging on metadata search

This commit is contained in:
Ozzie Isaacs 2021-08-29 14:37:15 +02:00
parent d1e6a85803
commit 4d92d7da3a

View File

@ -104,15 +104,11 @@ def metadata_search():
data = list()
active = current_user.view_settings.get('metadata', {})
if query:
a = datetime.datetime.now()
static_cover = url_for('static', filename='generic_cover.jpg')
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)}
for future in concurrent.futures.as_completed(meta):
data.extend(future.result())
b = datetime.datetime.now()
c = b - a
log.info(c.total_seconds())
return Response(json.dumps(data), mimetype='application/json')