From 71ac793101fe61b133c397724fbebec64f75d54f Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 6 Oct 2021 18:42:44 +0200 Subject: [PATCH] Include duration in api_missing_wikidata_items response --- web_view.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web_view.py b/web_view.py index d82f28b..08544b5 100755 --- a/web_view.py +++ b/web_view.py @@ -423,6 +423,7 @@ def api_find_osm_candidates(item_id): @app.route("/api/1/missing") def api_missing_wikidata_items(): + t0 = time() qids_arg = request.args.get("qids") if not qids_arg: return cors_jsonify(success=False, @@ -443,7 +444,11 @@ def api_missing_wikidata_items(): lat, lon = request.args.get("lat"), request.args.get("lon") ret = api.missing_wikidata_items(qids, lat, lon) - return cors_jsonify(success=True, **ret) + t1 = time() - t0 + return cors_jsonify( + success=True, + duration=t1, + **ret) @app.route("/api/1/search")