pricedb/app.py
def prune_all(self) -> int:
        """
        Prune historical prices for all symbols, leaving only the latest.
        Returns the number of items removed.
        """
        from .repositories import PriceRepository

        # get all symbols that have prices
        repo = PriceRepository()
        items = repo.query.distinct(dal.Price.namespace, dal.Price.symbol).all()
        # self.logger.debug(items)
        count = 0

        for item in items:
            symbol = SecuritySymbol(item.namespace, item.symbol)
            deleted = self.prune(symbol)
            if deleted:
                count += 1

        return count
def prune_all(self) -> int:
        from .repositories import PriceRepository

        # get all symbols that have prices
        repo = PriceRepository()
        items = repo.query.distinct(dal.Price.namespace, dal.Price.symbol).all()
        # self.logger.debug(items)
        count = 0

        for item in items:
            symbol = SecuritySymbol(item.namespace, item.symbol)
            deleted = self.prune(symbol)
            if deleted:
                count += 1

        return count
def prune_all ( self ) -> int : from . repositories import PriceRepository # get all symbols that have prices repo = PriceRepository ( ) items = repo . query . distinct ( dal . Price . namespace , dal . Price . symbol ) . all ( ) # self.logger.debug(items) count = 0 for item in items : symbol = SecuritySymbol ( item . namespace , item . symbol ) deleted = self . prune ( symbol ) if deleted : count += 1 return count
Prune historical prices for all symbols, leaving only the latest.
        Returns the number of items removed.
Prune historical prices for all symbols leaving only the latest . Returns the number of items removed .