Skip to content

Commit 50ff04c

Browse files
committed
fix: addDatabaseIndex races Orion/IoT-Agent and kills the services script
1 parent 63f5c9b commit 50ff04c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎services‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,10 @@ stoppingContainers () {
5555
addDatabaseIndex () {
5656
printf "Adding appropriate \033[1mMongoDB\033[0m indexes for \033[1;34mOrion\033[0m ..."
5757
docker exec db-mongo mongosh --eval '
58-
conn = new Mongo();db.createCollection("orion");
58+
conn = new Mongo();
5959
db = conn.getDB("orion");
60-
db.createCollection("entities");
6160
db.entities.createIndex({"_id.servicePath": 1, "_id.id": 1, "_id.type": 1}, {unique: true});
62-
db.entities.createIndex({"_id.type": 1});
61+
db.entities.createIndex({"_id.type": 1});
6362
db.entities.createIndex({"_id.id": 1});' > /dev/null
6463
}
6564

0 commit comments

Comments
 (0)