diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2016-12-10 00:06:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-10 00:06:39 +0100 |
| commit | ceb8ae6439f092dad6e26406cd178c2195eb0898 (patch) | |
| tree | 8b285b2dd483006d08c03b9fec49cba49ff16a87 /searx/webapp.py | |
| parent | d80fb2c8e8995facb3a25c152c47a93eecf1fee4 (diff) | |
| parent | e48f07a367e55bf8aa881902b977bd7ce1cd2bb6 (diff) | |
Merge pull request #751 from dalf/searchpy2
Simplify search.py
Diffstat (limited to 'searx/webapp.py')
| -rw-r--r-- | searx/webapp.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index cdac52a45..7d4936f18 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -601,6 +601,8 @@ def preferences(): if e.timeout > settings['outgoing']['request_timeout']: stats[e.name]['warn_timeout'] = True + # get first element [0], the engine time, + # and then the second element [1] : the time (the first one is the label) for engine_stat in get_engines_stats()[0][1]: stats[engine_stat.get('name')]['time'] = round(engine_stat.get('avg'), 3) if engine_stat.get('avg') > settings['outgoing']['request_timeout']: |