forked from DebaucheryLibrarian/traxxx
Using options instead of config dependency for common location resolver.
This commit is contained in:
2
common
2
common
Submodule common updated: 4316b69a43...7a39529e2c
@@ -39,7 +39,6 @@ const { resolveLayoutScraper } = require('./scrapers/resolve');
|
|||||||
const getRecursiveParameters = require('./utils/get-recursive-parameters');
|
const getRecursiveParameters = require('./utils/get-recursive-parameters');
|
||||||
|
|
||||||
const commonContext = {
|
const commonContext = {
|
||||||
argv,
|
|
||||||
knex,
|
knex,
|
||||||
redis,
|
redis,
|
||||||
logger,
|
logger,
|
||||||
@@ -474,8 +473,8 @@ async function curateProfile(profile, actor) {
|
|||||||
|
|
||||||
if (argv.resolvePlace) {
|
if (argv.resolvePlace) {
|
||||||
const [placeOfBirth, placeOfResidence] = await Promise.all([
|
const [placeOfBirth, placeOfResidence] = await Promise.all([
|
||||||
resolvePlace(profile.birthPlace, commonContext),
|
resolvePlace(profile.birthPlace, commonContext, { useCache: argv.placeCache, userAgent: config.location.userAgent }),
|
||||||
resolvePlace(profile.residencePlace, commonContext),
|
resolvePlace(profile.residencePlace, commonContext, { useCache: argv.placeCache, userAgent: config.location.userAgent }),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
curatedProfile.placeOfBirth = placeOfBirth;
|
curatedProfile.placeOfBirth = placeOfBirth;
|
||||||
|
|||||||
Reference in New Issue
Block a user