Sort fetched nodes by creation date
This commit is contained in:
@@ -29,7 +29,7 @@ def latest_nodes(db_filter, projection, py_filter, limit):
|
|||||||
proj.update(projection)
|
proj.update(projection)
|
||||||
|
|
||||||
latest = keep_fetching(nodes, db_filter, proj,
|
latest = keep_fetching(nodes, db_filter, proj,
|
||||||
[('_updated', pymongo.DESCENDING)],
|
[('_created', pymongo.DESCENDING)],
|
||||||
py_filter, limit)
|
py_filter, limit)
|
||||||
|
|
||||||
result = list(itertools.islice(latest, limit))
|
result = list(itertools.islice(latest, limit))
|
||||||
|
Reference in New Issue
Block a user