add an index on tracked._random
This commit is contained in:
parent
1047ca8927
commit
4e860f7b44
1 changed files with 3 additions and 0 deletions
|
@ -43,6 +43,9 @@ class Client(object):
|
|||
if self.db.status.count() == 0:
|
||||
self.db.status.insert({'update_queue': 0})
|
||||
|
||||
# ensure an index on _random
|
||||
self.db.tracked.ensure_index([('_random', pymongo.ASCENDING)])
|
||||
|
||||
self._collection_name = 'fs'
|
||||
self.fs = gridfs.GridFS(self.db, self._collection_name)
|
||||
self.scraper = scrapelib.Scraper(user_agent=user_agent,
|
||||
|
|
Loading…
Reference in a new issue