Skip to content

Commit

Permalink
remove geolocation
Browse files Browse the repository at this point in the history
  • Loading branch information
shekenahglory committed Aug 29, 2018
1 parent 2f77321 commit 2ef478a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 201 deletions.
26 changes: 13 additions & 13 deletions lib/hbase/hbase-thrift/topology.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,19 @@ function getTopologyNodes(options = {}) {

function getNodeDetails(pubkey, all = true) {
const columns = all ? undefined : [
'g:lat',
'g:long',
'g:continent',
'g:country',
'g:region',
'g:city',
'g:postal_code',
'g:country_code',
'g:region_code',
'g:timezone',
'g:isp',
'g:org',
'g:domain'
'f:lat',
'f:long',
'f:continent',
'f:country',
'f:region',
'f:city',
'f:postal_code',
'f:country_code',
'f:region_code',
'f:timezone',
'f:isp',
'f:org',
'f:domain'
]

return new Promise(function(resolve, reject) {
Expand Down
22 changes: 0 additions & 22 deletions lib/validations/etl.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ const manifests = require('./manifests')(config.get('hbase'));
const validations = require('./validations')(config.get('hbase'),
config.get('validator-config'));
const CronJob = require('cron').CronJob;
const geo = require('./geolocation')({
hbase: config.get('hbase'),
maxmind: config.get('maxmind')
});

const connections = {};

Expand Down Expand Up @@ -187,17 +183,6 @@ function subscribeToRippleds(rippleds) {
return connections;
}

/**
* geolocate
*/

function geolocate() {
geo.geolocateNodes()
.catch(e => {
log.error(e);
});
}

/**
* start
*/
Expand All @@ -218,11 +203,4 @@ manifests.start().then(() => {
refreshSubscriptions();
validations.start();
validations.verifyDomains()

// setup cron job for geolocation
const geoLocationCron = new CronJob({
cronTime: '0 0 4 * * *',
onTick: geolocate,
start: true
});
});
136 changes: 0 additions & 136 deletions lib/validations/geolocation.js

This file was deleted.

60 changes: 30 additions & 30 deletions test/test.network.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,40 +37,40 @@ const getInverseTimestamp = date => (timeInfinity - Number(smoment(date).format(

const geolocation = {
n9KcmEKTW3ggFgTjNMVkJwJ5R8RhQZeacYLTVgWFcnwheniS7zGA: {
'g:lat': 37.3394,
'g:long': -121.895,
'g:country': 'United States',
'g:region': 'California',
'g:city': 'San Jose',
'g:postal_code': '95141',
'g:country_code': 'US',
'g:region_code': 'CA',
'g:timezone': 'America/Los_Angeles',
'g:isp': 'SoftLayer Technologies Inc.'
'f:lat': 37.3394,
'f:long': -121.895,
'f:country': 'United States',
'f:region': 'California',
'f:city': 'San Jose',
'f:postal_code': '95141',
'f:country_code': 'US',
'f:region_code': 'CA',
'f:timezone': 'America/Los_Angeles',
'f:isp': 'SoftLayer Technologies Inc.'
},
n9LKATbwprxwHPuQpJC2oJjkKZXHPaCjHUskDSBgvDTrTWQLnMwr: {
'g:lat': 37.751,
'g:long': -97.822,
'g:country': 'United States',
'g:region': undefined,
'g:city': undefined,
'g:postal_code': undefined,
'g:country_code': 'US',
'g:region_code': undefined,
'g:timezone': undefined,
'g:isp': 'SoftLayer Technologies Inc.'
'f:lat': 37.751,
'f:long': -97.822,
'f:country': 'United States',
'f:region': undefined,
'f:city': undefined,
'f:postal_code': undefined,
'f:country_code': 'US',
'f:region_code': undefined,
'f:timezone': undefined,
'f:isp': 'SoftLayer Technologies Inc.'
},
n9MR8WCUhNLtdVTw4Lc4KaKMLHb7pxfYriQVi6SZ9xUvC6Ni2w59: {
'g:lat': 45.8696,
'g:long': -119.688,
'g:country': 'United States',
'g:region': 'Oregon',
'g:city': 'Boardman',
'g:postal_code': '97818',
'g:country_code': 'US',
'g:region_code': 'OR',
'g:timezone': 'America/Los_Angeles',
'g:isp': 'Amazon.com, Inc.'
'f:lat': 45.8696,
'f:long': -119.688,
'f:country': 'United States',
'f:region': 'Oregon',
'f:city': 'Boardman',
'f:postal_code': '97818',
'f:country_code': 'US',
'f:region_code': 'OR',
'f:timezone': 'America/Los_Angeles',
'f:isp': 'Amazon.com, Inc.'
}
}
/**
Expand Down

0 comments on commit 2ef478a

Please sign in to comment.