From b14cb66d7c3de991ad57140c052736e1bfd4346f Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 17 Jun 2020 22:59:24 -0400 Subject: [PATCH] Drop disk caching of quotes --- piker/ui/quantdom/loaders.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/piker/ui/quantdom/loaders.py b/piker/ui/quantdom/loaders.py index 8de6c274..52203976 100644 --- a/piker/ui/quantdom/loaders.py +++ b/piker/ui/quantdom/loaders.py @@ -62,9 +62,7 @@ class QuotesLoader: @classmethod def _save_to_disk(cls, fpath, data): logger.debug('Saving quotes to a file: %s', fpath) - breakpoint() with open(fpath, 'wb') as f: - pass pickle.dump(data, f, pickle.HIGHEST_PROTOCOL) d = pickle.load(f) @@ -92,12 +90,11 @@ class QuotesLoader: # quotes = Quotes.new(cls._load_from_disk(fpath)) # else: quotes_raw = cls._get(symbol, date_from, date_to) - breakpoint() - quotes = Quotes.new( - quotes_raw, source=cls.source, default_tf=cls.default_tf - ) - cls._save_to_disk(fpath, quotes) - return quotes + # quotes = Quotes.new( + # quotes_raw, source=cls.source, default_tf=cls.default_tf + # ) + # cls._save_to_disk(fpath, quotes) + return quotes_raw class YahooQuotesLoader(QuotesLoader):