Skip to content

Refactor how we query the DB in cronjobs #283

@alvaro-mazcu

Description

@alvaro-mazcu

In https://github.com/Tanzania-AI-Community/twiga/blob/development/scripts/crons/helpers/database.py we are creating a new DB connection, as well as new queries. These queries are agnostic to the cronjob status or the app status, so they can be stored in https://github.com/Tanzania-AI-Community/twiga/blob/development/app/database/db.py with the rest of queries. The dev should also check which queries are very similar in both files so that we group them into one single query, simplifying the code and reducing the technical debt

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions