Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
Revert "price logging"
Browse files Browse the repository at this point in the history
This reverts commit 26b1339.
  • Loading branch information
CelestialCrafter committed Feb 9, 2024
1 parent ed02c12 commit b41d3bb
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/price.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from redis import from_url
from dotenv import load_dotenv
from flask import has_request_context, request
from utils import setup_logger

load_dotenv()
redis = from_url(os.environ['REDIS_URI'])
Expand Down Expand Up @@ -39,8 +38,6 @@ def get_using_coin() -> str:
return default_coin

def get_prices(interval, pair):
logger = setup_logger()

if not interval or not pair:
raise Exception('No Interval/Pair')

Expand All @@ -55,9 +52,4 @@ def get_prices(interval, pair):
prices = redis.lrange(f'{pair}:prices', 0, -1)[::slicing_ratio]
timestamps = redis.lrange(f'{pair}:timestamps', 0, -1)[::slicing_ratio]

logger.info('Get Prices', extra={
'slicing_ratio': slicing_ratio,
'length_prices_timestamps': len(prices),
})

return np.array(prices).astype(float), np.array(timestamps).astype(int)

0 comments on commit b41d3bb

Please sign in to comment.