25 lines
923 B
Plaintext
25 lines
923 B
Plaintext
auto find() {
|
|
return Map.findRange([
|
|
"$and": [
|
|
["deleted": Bson(false)],
|
|
[
|
|
"$or": Bson([
|
|
serializeToBson(["forceUpdate": Bson(true)]),
|
|
serializeToBson([
|
|
"info.approved": ["$eq": Bson(1)],
|
|
"fetchDate": [
|
|
"$lte": Bson(BsonDate(currentTime - 60.days))
|
|
]
|
|
]),
|
|
serializeToBson([
|
|
"info.approved": ["$ne": Bson(1)],
|
|
"fetchDate": [
|
|
"$lte": Bson(BsonDate(currentTime - 14.days))
|
|
]
|
|
])
|
|
])
|
|
]
|
|
]
|
|
]);
|
|
}
|