AltCamp / altcampv1-backend

AltCamp is an e-learning platform that allows students to post messages to the discussion threads, interact and receive feedback from other students and instructors, and hence create a deeper understanding of the subject matter being discussed.
https://altcamp.onrender.com
MIT License
13 stars 17 forks source link

🐛: Continuous logging of Redis error when env keys are missing #232

Closed Olatisunkanmi closed 9 months ago

Olatisunkanmi commented 1 year ago

Contact Details

No response

What happened?

when I start my server, Redis continuously throws error when my env keys are missing. Logs twice, every second.

Expected behavior

Like every other db, It should log only once when I start my server

Your Environment

Fedora 38

Steps to Reproduce the Behavior

  1. Start your server without your redis config set in your env

Relevant log output

No response

Additional Context

No response

Code of Conduct

tobisupreme commented 1 year ago

Nice spot.

What fixes do you propose?

Olatisunkanmi commented 1 year ago

I think it should act like any other DB. when my server starts, it should log the error once and when I try to write/read from the DB, it should throw an error

tobisupreme commented 1 year ago

That sounds great. We can do that 😁

Olatisunkanmi commented 1 year ago

Hi, @tobisupreme I think the problems, is a little deeper than. The error logs continuously because the cache tries to establish connection even though the env file is missing.