@classmethod
    def get_indexed_before(cls, date):
        """Get all repos indexed before the given date and not currently
        being indexed."""
        # Hack: should be lazier about this.
        if date is not None:
            return cls._object_store.find({'last_index' : {'$lt' : date},
                                           'indexing' : False,
                                           'approved' : True})
        else:
            return cls._object_store.find({'approved' : True,
                                           'indexing' : False})
dataset/ETHPy150Open ebroder/anygit/anygit/backends/mongodb.py/Repository.get_indexed_before/original