add mongo index names

fixes bug #1028485

Change-Id: Iccdda933ebe574db2927a62516cf7e1189dac6eb
This commit is contained in:
John Tran
2012-10-31 17:38:34 +00:00
parent 2aec7f16f9
commit e71000be85
2 changed files with 10 additions and 2 deletions

View File

@@ -191,14 +191,14 @@ class Connection(base.Connection):
self.db.resource.ensure_index([
(primary, pymongo.ASCENDING),
('source', pymongo.ASCENDING),
])
], name='resource_idx')
self.db.meter.ensure_index([
('resource_id', pymongo.ASCENDING),
(primary, pymongo.ASCENDING),
('counter_name', pymongo.ASCENDING),
('timestamp', pymongo.ASCENDING),
('source', pymongo.ASCENDING),
])
], name='meter_idx')
return
def _get_connection(self, opts):