add an index on tracked._random
This commit is contained in:
parent
1047ca8927
commit
4e860f7b44
@ -43,6 +43,9 @@ class Client(object):
|
|||||||
if self.db.status.count() == 0:
|
if self.db.status.count() == 0:
|
||||||
self.db.status.insert({'update_queue': 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._collection_name = 'fs'
|
||||||
self.fs = gridfs.GridFS(self.db, self._collection_name)
|
self.fs = gridfs.GridFS(self.db, self._collection_name)
|
||||||
self.scraper = scrapelib.Scraper(user_agent=user_agent,
|
self.scraper = scrapelib.Scraper(user_agent=user_agent,
|
||||||
|
Loading…
Reference in New Issue
Block a user