RedHatInsights/insights-host-inventory

Move Kafka configuration to the config object

Glutexo opened this issue · 0 comments

The tasks module loads some environment variables to configure the Kafka message queue. They’re used then by the consumer, which has access to the flask app. It’d be better to have the configuration concentrated in a single place, the app.config module and then in the flask_app.config property. The database and path configuration is already loaded in the module. Some of it is already stored in the property.

Like that there will be only a single place that interacts with os.environ. Also the uses of the configuration options will be on one place, nicely readable. It’d improve testability too.

Related to #159.