Browse Source

qtis: remove logging

master
Denis Tereshkin 4 years ago
parent
commit
b2b91c8cea
  1. 5
      src/ATrade/Quotes/QTIS.hs

5
src/ATrade/Quotes/QTIS.hs

@ -14,7 +14,6 @@ import qualified Data.ByteString.Char8 as BC8
import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Lazy as BL
import Data.Maybe import Data.Maybe
import qualified Data.Text as T import qualified Data.Text as T
import System.Log.Logger
import System.ZMQ4 import System.ZMQ4
data TickerInfo = TickerInfo { data TickerInfo = TickerInfo {
@ -41,15 +40,11 @@ qtisGetTickersInfo' endpoint tickers = withContext (\ctx -> qtisGetTickersInfo c
qtisGetTickersInfo :: Context -> T.Text -> [TickerId] -> IO [TickerInfo] qtisGetTickersInfo :: Context -> T.Text -> [TickerId] -> IO [TickerInfo]
qtisGetTickersInfo ctx endpoint tickers = qtisGetTickersInfo ctx endpoint tickers =
withSocket ctx Req (\sock -> do withSocket ctx Req (\sock -> do
debugM "QTIS" $ "Connecting to: " ++ T.unpack endpoint
connect sock $ T.unpack endpoint connect sock $ T.unpack endpoint
catMaybes <$> forM tickers (\tickerId -> do catMaybes <$> forM tickers (\tickerId -> do
debugM "QTIS" $ "Requesting: " ++ T.unpack tickerId
send sock [] $ BL.toStrict (tickerRequest tickerId) send sock [] $ BL.toStrict (tickerRequest tickerId)
response <- receiveMulti sock response <- receiveMulti sock
debugM "QTIS" $ show response
let r = parseResponse response let r = parseResponse response
debugM "QTIS" $ "Got response: " ++ show r
return r)) return r))
where where
tickerRequest tickerId = encode $ object ["ticker" .= tickerId] tickerRequest tickerId = encode $ object ["ticker" .= tickerId]

Loading…
Cancel
Save