Skip to content

Commit 93cc3e1

Browse files
authored
gh-511 Refactor database connection settings in configuration files (#527)
Updated the structure of the database connection settings in setup.md, appsettings.Development.json, and appsettings.mongodb.json to include a new "DatabaseOptions" section. This section now contains the "DatabaseName" and a "retries" configuration with specified delay values. Signed-off-by: Victor Chang <[email protected]>
1 parent 00a3ab5 commit 93cc3e1

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

docs/setup/setup.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,16 @@ username, password, IP address/hostname, and port.
148148
"ConnectionStrings": {
149149
"Type": "mongodb",
150150
"InformaticsGatewayDatabase": "mongodb://username:password@IP:port",
151-
"DatabaseName": "InformaticsGateway"
151+
"DatabaseOptions": {
152+
"DatabaseName": "InformaticsGateway",
153+
"retries": {
154+
"delays": [
155+
"750",
156+
"1201",
157+
"2500"
158+
]
159+
}
160+
}
152161
}
153162
}
154163
```

src/InformaticsGateway/appsettings.Development.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@
55
"ConnectionStrings": {
66
"Type": "mongodb",
77
"InformaticsGatewayDatabase": "mongodb://root:rootpassword@localhost:27017",
8-
"DatabaseName": "InformaticsGateway"
8+
"DatabaseOptions": {
9+
"DatabaseName": "InformaticsGateway",
10+
"retries": {
11+
"delays": [
12+
"750",
13+
"1201",
14+
"2500"
15+
]
16+
}
17+
}
918
},
1019
"InformaticsGateway": {
1120
"dicom": {

tests/Integration.Test/appsettings.mongodb.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
"ConnectionStrings": {
33
"Type": "mongodb",
44
"InformaticsGatewayDatabase": "mongodb://root:rootpassword@localhost:27017",
5-
"DatabaseName": "InformaticsGateway"
5+
"DatabaseOptions": {
6+
"DatabaseName": "InformaticsGateway",
7+
"retries": {
8+
"delays": [
9+
"750",
10+
"1201",
11+
"2500"
12+
]
13+
}
14+
}
615
}
716
}

0 commit comments

Comments
 (0)