Fix logging in money module
This commit is contained in:
@@ -11,6 +11,7 @@ from forex_python.converter import CurrencyRates
|
|||||||
|
|
||||||
# Other library imports
|
# Other library imports
|
||||||
from core.models import Aggregator, OperatorWallets, Platform
|
from core.models import Aggregator, OperatorWallets, Platform
|
||||||
|
from core.util import logs
|
||||||
|
|
||||||
# TODO: secure ES traffic properly
|
# TODO: secure ES traffic properly
|
||||||
urllib3.disable_warnings()
|
urllib3.disable_warnings()
|
||||||
@@ -20,6 +21,8 @@ tracer.setLevel(logging.CRITICAL)
|
|||||||
tracer = logging.getLogger("elastic_transport.transport")
|
tracer = logging.getLogger("elastic_transport.transport")
|
||||||
tracer.setLevel(logging.CRITICAL)
|
tracer.setLevel(logging.CRITICAL)
|
||||||
|
|
||||||
|
log = logs.get_logger("money")
|
||||||
|
|
||||||
|
|
||||||
class Money(object):
|
class Money(object):
|
||||||
"""
|
"""
|
||||||
@@ -134,7 +137,7 @@ class Money(object):
|
|||||||
async def get_minmax(self, min_usd, max_usd, asset, currency):
|
async def get_minmax(self, min_usd, max_usd, asset, currency):
|
||||||
rates = await self.get_rates_all()
|
rates = await self.get_rates_all()
|
||||||
if currency not in rates and not currency == "USD":
|
if currency not in rates and not currency == "USD":
|
||||||
self.log.error(f"Can't create ad without rates: {currency}")
|
log.error(f"Can't create ad without rates: {currency}")
|
||||||
return
|
return
|
||||||
if currency == "USD":
|
if currency == "USD":
|
||||||
min_amount = min_usd
|
min_amount = min_usd
|
||||||
|
|||||||
Reference in New Issue
Block a user