Removed unused code

This commit is contained in:
2017-09-15 17:32:55 +02:00
parent 6af0cd2be8
commit 9cce441f6c

View File

@@ -1,5 +1,3 @@
import functools
import itertools
import typing
import bson
@@ -11,19 +9,6 @@ from pillar.api.utils import jsonify
blueprint = Blueprint('latest', __name__)
def keep_fetching(collection, db_filter, projection, sort, py_filter,
batch_size=12):
"""Yields results for which py_filter returns True"""
db_filter['_deleted'] = {'$ne': True}
curs = collection.find(db_filter, projection).sort(sort)
curs.batch_size(batch_size)
for doc in curs:
if py_filter(doc):
yield doc
def _public_project_ids() -> typing.List[bson.ObjectId]:
"""Returns a list of ObjectIDs of public projects.