fix: do not fail on fresh install

pull/12/head
Raphaël Vinot 2018-07-13 17:39:37 +02:00
parent 5efae34367
commit 5d335159e6
1 changed files with 1 additions and 2 deletions

View File

@ -75,8 +75,7 @@ class Ranking():
def compute(self): def compute(self):
self.logger.info('Start ranking') self.logger.info('Start ranking')
set_running(self.__class__.__name__) set_running(self.__class__.__name__)
v4_last, v6_last = self.asn_meta.mget('v4|last', 'v6|last') if self.asn_meta.exists('v4|last', 'v6|last') != 2:
if not v4_last or not v6_last:
'''Failsafe if asn_meta has not been populated yet''' '''Failsafe if asn_meta has not been populated yet'''
unset_running(self.__class__.__name__) unset_running(self.__class__.__name__)
return return