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.
[x] Make sure you are opening from a topic/feature/bugfix branch
[x] Ensure that the PR title represents the desired changes
[x] Ensure that the PR description detail the desired changes
[x] Link to relevant issues in GitHub or Jira
[x] Link to relevant pull requests, esp. upstream and downstream changes
~- [ ] Ensure you have provided tests - that demonstrates feature works or fixes the issue~
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