Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Kafka configuration to the config object #272

Open
Glutexo opened this issue May 14, 2019 · 0 comments
Open

Move Kafka configuration to the config object #272

Glutexo opened this issue May 14, 2019 · 0 comments

Comments

@Glutexo
Copy link
Collaborator

Glutexo commented May 14, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant