コード例 #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
ファイル: exchange.py プロジェクト: buttcoin/bitHopper
 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)