Closed steinerkelvin closed 4 months ago
Implemented in 5d6e933 / c597787.
I chose the name COMX_NODE_URLS
for the env var instead. Other env vars will be prefixed with COMX_
.
pydantic-settings
defaults to loading lists and other composite types as JSON, so to set the variable one would do in sh:
export COMX_NODE_URLS='["wss://testnet-commune-api-node-0.communeai.net"]'
@PsicoThePato what do you think?
I may also have a --testnet
flag that provides another default list with testnet nodes.
@PsicoThePato what do you think? I hate the way the variable is set, but well, such is life. COMX_ prefix is great. Maybe it's worth to support weights on the nodes to allow more control.
I hate the way the variable is set
wdym?
Maybe it's worth to support weights on the nodes
Nah, unnecessary complexity.
I may also have a --testnet flag that provides another default list with testnet nodes.
This is implemented.
Setting the environment variable
COMMUNE_NODE_URLS
like thisshould make
comx
connect to one of the specified nodes.The value is a list, with the purpose of load balancing / failover (which doesn't need to be implemented right now). Probably comma separated, but could be something else if more convenient to implement.