Skip to content

Commit

Permalink
check_scheme 增加时间下限
Browse files Browse the repository at this point in the history
  • Loading branch information
laike9m committed Mar 19, 2016
1 parent 7026825 commit 16b36b8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions infer/bin/check_scheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@

a_colls = ["19550517_a", "19551147_a", "19561087_a", "19553298_a"]
db = pymongo.MongoClient('127.0.0.1', 27017).get_database(database)
start_search_time = datetime(2016,4,1)

# check upvoters sorted
for a_coll in a_colls:
coll = db.get_collection(a_coll)
for adoc in coll.find():
for adoc in coll.find({'time': {'$gt': start_search_time}}):
followers = adoc['upvoters']
last_datetime = datetime(1970,1,1)
sort = True
Expand All @@ -30,7 +31,7 @@
# check commenters sorted
for a_coll in a_colls:
coll = db.get_collection(a_coll)
for adoc in coll.find():
for adoc in coll.find({'time': {'$gt': start_search_time}}):
followers = adoc['commenters']
last_datetime = datetime(1970,1,1)
sort = True
Expand All @@ -51,7 +52,7 @@
# check commenters sorted
for a_coll in a_colls:
coll = db.get_collection(a_coll)
for adoc in coll.find():
for adoc in coll.find({'time': {'$gt': start_search_time}}):
followers = adoc['collectors']
last_datetime = datetime(1970,1,1)
sort = True
Expand All @@ -74,7 +75,7 @@

for q_coll in q_colls:
coll = db.get_collection(q_coll)
for qdoc in coll.find():
for qdoc in coll.find({'time': {'$gt': start_search_time}}):
followers = qdoc['follower']
last_datetime = datetime(1970,1,1)
sort = True
Expand Down

0 comments on commit 16b36b8

Please sign in to comment.