Skip to content

Commit

Permalink
ADD missing geoloc and expiration indexes to Orion service provision
Browse files Browse the repository at this point in the history
  • Loading branch information
fgalan committed Jan 25, 2021
1 parent aab628d commit ec23ebc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
CHANGES
=======

FIX: create geo-index in Orion DB upon service provision (#301)
FIX: cratee expiration index in Orion DB upon service provision
Upgrade Dockerfile base image from centos7.7.1908 to centos7.9.2009

3.7.0
Expand Down
2 changes: 2 additions & 0 deletions src/orchestrator/core/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def createOrionIndexes(self, SERVICE_NAME):
# For Orion
databaseName = 'orion-' + SERVICE_NAME
db = self.client[databaseName]
db.entities.create_index([("location.coords", pymongo.GEOSPHERE)])
db.entities.create_index("expDate", expireAfterSeconds=0)
db.entities.create_index([("_id.servicePath", pymongo.ASCENDING),
("_id.id", pymongo.ASCENDING),
("_id.type", pymongo.ASCENDING)])
Expand Down

0 comments on commit ec23ebc

Please sign in to comment.