Browse Source

add coarse reverse logging so we can tell how often it's getting called

pull/863/head
Diana Shkolnikov 8 years ago
parent
commit
7c58f98ee1
  1. 3
      controller/coarse_reverse.js

3
controller/coarse_reverse.js

@ -92,6 +92,7 @@ function setup(service, should_execute) {
service(centroid, isDNT(req), (err, results) => {
// if there's an error, log it and bail
if (err) {
logger.info(`[controller:coarse_reverse][error]`);
logger.error(err);
return next();
}
@ -101,6 +102,8 @@ function setup(service, should_execute) {
return req.clean.layers.indexOf(granularity) !== -1;
});
logger.info(`[controller:coarse_reverse][queryType:pip][result_count:${Object.keys(results).length}]`);
// now remove everything from the response that is more granular than the
// most granular layer requested. that is, if req.clean.layers=['county'],
// remove neighbourhoods, localities, and localadmins

Loading…
Cancel
Save