예제 #1
0
파일: diff.py 프로젝트: amrando/bitHopper
 def update_difficulty(self):
     while True:
         with self.lock:
             for coin in btcnet_info.get_coins():
                 if getattr(coin, 'difficulty', None):
                     self.diff[coin.name] = float(coin.difficulty)
         gevent.sleep(60*10)
예제 #2
0
 def update_profitability(self):
     while True:
         with self.lock:
             for coin in btcnet_info.get_coins():
                 self.rate[coin.name] = getattr(coin, 'exchange', 0)
             self.calc_profit()
         gevent.sleep(60*5)
예제 #3
0
파일: diff.py 프로젝트: buttcoin/bitHopper
 def update_difficulty(self):
     while True:
         with self.lock:
             for coin in btcnet_info.get_coins():
                 if getattr(coin, 'difficulty', None):
                     try:
                         logging.info('Difficulty for %s:%s' % (coin.name, coin.difficulty))
                         self.diff[coin.name] = float(coin.difficulty)
                     except:
                         pass
         gevent.sleep(60)