コード例 #1
0
    def update_ticker_model(ticker, btcVal, usdVal, lastUpdated):
        try:

            tickerModel = TickerModel.get(TickerModel.Ticker == ticker)
            tickerModel.BTCVal = round(btcVal, 8)
            tickerModel.USDVal = round(usdVal, 8)
            tickerModel.LastUpdated = lastUpdated
            tickerModel.save()
            return True
        except Exception as e:
            logger.exception(e)
            return False