Open insipx opened 2 years ago
Hi @insipx, I have introduced the AMQP_URL variable into my fork.
1.) this sounds good; there is already a control config implementation for the task url: https://github.com/paritytech/substrate-archive/blob/eeb593ed13867642c9b80a39556a75a36c4e47bc/substrate-archive/src/actors.rs#L100
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
the rabbitMQ url should have the possibility of being configured via the environment similar to how
DATABASE_URL
andCHAIN_DATA_DB
are. The environment variable could beAMQP_URL