Skip to content

Commit 6970466

Browse files
authored
Merge pull request #19 from oslabs-beta/new_test
Tweaks for postgres connection and comments
2 parents 82d5dbe + 7144d7f commit 6970466

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

electron/databases/postgres.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ const connectSQL = async (i: number, URI: string) => {
44
try {
55
const pool= new Pool({
66
connectionString: URI,
7+
idleTimeoutMillis: 2000, // Time after which idle connections are closed
78
})
89
const client = await pool.connect();
9-
client.release()
10+
client.release() // Releases connection back to the pool
1011
console.log('connected to sql')
1112
return pool;
1213
} catch (err) {

examples/docker/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,18 @@ ORDER_URI = A **MongoDB** URI for the orderserver microservice to use
3131
docker-compose -f docker-compose.yml up
3232
```
3333

34-
#
34+
#
3535

3636
You should now see the containers running in your terminal, each reporting "Docker data recorded in...". If this is being displayed for the books, customers, frontend, and orders microservices then the example is successfully saving health metrics to your database of choice!
3737

3838
*If there is any error when running the applications and the underlying files for a microservice were changed, be sure to delete the previous image before calling `docker-compose -f docker-compose.yml up` again. If you do not, the docker compose command will not know to rebuild the image and the code changes meant to fix any issues will not be rolled into the existing Docker image!*
3939

4040
Your microservice health metrics can now be viewed at the given `CHRONOS_URI` or, preferrably, in the Electron.js desktop application.
4141

42-
#
42+
43+
# To stop and remove containers
44+
Use `docker compose down` to stop containers
45+
4346

4447
## Contributing
4548
Chronos hopes to inspire an active community of both users and developers. For questions, comments, or contributions, please submit a pull request.

0 commit comments

Comments
 (0)