@mediocre/bloodhound
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -104,4 +104,2 @@ const async = require('async'); | ||
console.log(scanDetail); | ||
if (DELIVERED_TRACKING_STATUS_CODES.includes(scanDetail.scanType.toString())) { | ||
@@ -108,0 +106,0 @@ results.deliveredAt = new Date(event.date); |
@@ -130,3 +130,3 @@ const async = require('async'); | ||
} else { | ||
geography.parseLocation(location, function(err, address) { | ||
geography.parseLocation(location, options, function(err, address) { | ||
if (err || !address) { | ||
@@ -133,0 +133,0 @@ return callback(err); |
20
index.js
@@ -17,9 +17,17 @@ const NodeGeocoder = require('node-geocoder'); | ||
// Allow PitneyBowes to cache geocode results in Redis (via petty-cache) | ||
if (options && options.pettyCache && options.pitneyBowes) { | ||
options.pitneyBowes.pettyCache = options.pettyCache; | ||
} | ||
if (options && options.pettyCache) { | ||
// Allow PitneyBowes to cache geocode results in Redis (via petty-cache) | ||
if (options.pitneyBowes) { | ||
options.pitneyBowes.pettyCache = options.pettyCache; | ||
} | ||
// Allow USPS to cache geocode results in Redis (via petty-cache) | ||
if (options && options.pettyCache && options.usps) { | ||
options.usps.pettyCache = options.pettyCache; | ||
// Allow UPS to cache geocode results in Redis (via petty-cache) | ||
if (options.ups) { | ||
options.ups.pettyCache = options.pettyCache; | ||
} | ||
// Allow USPS to cache geocode results in Redis (via petty-cache) | ||
if (options.usps) { | ||
options.usps.pettyCache = options.pettyCache; | ||
} | ||
} | ||
@@ -26,0 +34,0 @@ |
@@ -41,3 +41,3 @@ { | ||
}, | ||
"version": "1.1.6" | ||
"version": "1.1.7" | ||
} |
@@ -119,6 +119,6 @@ const async = require('async'); | ||
// Cache between 1-2 months | ||
// Cache between 11-12 months | ||
return pettyCache.fetch(`bloodhound.geocode:${location}`, function(callback) { | ||
geocode(location, callback); | ||
}, { ttl: { min: 2592000000, max: 5184000000 } }, callback); | ||
}, { ttl: { min: 28512000000, max: 31104000000 } }, callback); | ||
} | ||
@@ -125,0 +125,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60600
872