MOV-AI / backend

Backend web server and rest api for movai
Other
2 stars 2 forks source link

BP-1255: Delay use of Redis to after startup #208

Closed andreparames closed 1 week ago

andreparames commented 1 week ago

The Statistics module of the Fleet Manager needs to load data from Redis. Previously, it was relying on a connection started during the import of some Python modules, but that was changed in BP-944.

This commit changes the code to only load data from Redis when the API is first called, rather than during Python import, so that we can be sure the connection to Redis is already established.

Ticket: BP-1255

[^note]: Put an x into the [ ] to show you have filled the information. The template comes from https://github.com/MOV-AI/.github/blob/master/.github/pull_request_template.md You can override it by creating .github/pull_request_template.md in your own repository

sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
5 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud