Пример #1
0
 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
 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)