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

Make AMQP Url configurable via Environment variables #431

Open
insipx opened this issue Jan 25, 2022 · 2 comments
Open

Make AMQP Url configurable via Environment variables #431

insipx opened this issue Jan 25, 2022 · 2 comments
Labels

Comments

@insipx
Copy link
Collaborator

insipx commented Jan 25, 2022

the rabbitMQ url should have the possibility of being configured via the environment similar to how DATABASE_URL and CHAIN_DATA_DB are. The environment variable could be AMQP_URL

@joaoepj
Copy link

joaoepj commented Mar 23, 2022

Hi @insipx, I have introduced the AMQP_URL variable into my fork.

  1. I've created a function env_var_task_url() that uses AMQP_URL value, or fallback to default_task_url(). Is this enough, or should I create some ControlConfig implementation?
  2. Currently there's no AMQP_URL validation, which level of validation is expected here?

@insipx
Copy link
Collaborator Author

insipx commented Mar 23, 2022

1.) this sounds good; there is already a control config implementation for the task url:

pub(crate) task_url: String,

but the environment variable should take precedence over that option

2.) if the URL cannot connect the amqp library (lapin) would throw an error; otherwise i'm unsure of what kind of validation would be appropriate here. I would like to say that just accepting any URL would be fine

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

No branches or pull requests

2 participants