Libraries refactor and add some sinks #4
|
@ -10,6 +10,7 @@ from agoradesk_py import AgoraDesk
|
||||||
from pycoingecko import CoinGeckoAPI # TODO: remove this import and defer to money
|
from pycoingecko import CoinGeckoAPI # TODO: remove this import and defer to money
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from pyotp import TOTP
|
from pyotp import TOTP
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
# Project imports
|
# Project imports
|
||||||
from settings import settings
|
from settings import settings
|
||||||
|
|
|
@ -10,6 +10,7 @@ from string import ascii_uppercase
|
||||||
from elasticsearch import Elasticsearch
|
from elasticsearch import Elasticsearch
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import urllib3
|
import urllib3
|
||||||
|
import logging
|
||||||
|
|
||||||
# Project imports
|
# Project imports
|
||||||
from settings import settings
|
from settings import settings
|
||||||
|
@ -19,6 +20,11 @@ from util import convert
|
||||||
# TODO: secure ES traffic properly
|
# TODO: secure ES traffic properly
|
||||||
urllib3.disable_warnings()
|
urllib3.disable_warnings()
|
||||||
|
|
||||||
|
tracer = logging.getLogger("elasticsearch")
|
||||||
|
tracer.setLevel(logging.CRITICAL)
|
||||||
|
tracer = logging.getLogger("elastic_transport.transport")
|
||||||
|
tracer.setLevel(logging.CRITICAL)
|
||||||
|
|
||||||
|
|
||||||
class Transactions(object):
|
class Transactions(object):
|
||||||
"""
|
"""
|
||||||
|
@ -46,8 +52,8 @@ class Transactions(object):
|
||||||
"""
|
"""
|
||||||
deferToThread(self.get_total)
|
deferToThread(self.get_total)
|
||||||
deferToThread(self.get_remaining)
|
deferToThread(self.get_remaining)
|
||||||
deferToThread(self.get_profit)
|
deferToThread(self.money.get_profit)
|
||||||
deferToThread(self.get_profit, True)
|
deferToThread(self.money.get_profit, True)
|
||||||
deferToThread(self.get_open_trades_usd)
|
deferToThread(self.get_open_trades_usd)
|
||||||
deferToThread(self.get_total_remaining)
|
deferToThread(self.get_total_remaining)
|
||||||
deferToThread(self.get_total_with_trades)
|
deferToThread(self.get_total_with_trades)
|
||||||
|
|
Loading…
Reference in New Issue