camicroscope / Caracal

Conslidated Backend, Auth, and Security Services for caMicroscope
GNU General Public License v3.0
15 stars 94 forks source link

Application does not terminate if database connection fails #82

Closed YashKumarVerma closed 3 years ago

YashKumarVerma commented 3 years ago

Describe the bug

To Reproduce Steps to reproduce the behavior:

  1. kill your MongoDB instance
  2. try running the system

Expected behavior

  1. since MongoDB is a hard dependency of the project, it must terminate if connection is not made.

Screenshots asciicast

Desktop (please complete the following information):

birm commented 3 years ago

good point!

YashKumarVerma commented 3 years ago

while diving into the codebase, I've observed that each of the database calls is creating a new connection instead of using the existing one (pooling them).

Could we somehow improve it by using one definition and then re-using it across the application? This will also allow us to leverage the features of pooling.

@birm

birm commented 3 years ago

closed with #90