conductor(checkpoint): Checkpoint end of Phase 1
This commit is contained in:
15
scripts/cluster_status/config.py
Normal file
15
scripts/cluster_status/config.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import os
|
||||
|
||||
DEFAULT_CONSUL_URL = "http://consul.service.dc1.consul:8500"
|
||||
|
||||
def get_consul_url(url_arg=None):
|
||||
"""
|
||||
Resolves the Consul URL in the following order:
|
||||
1. CLI Argument (url_arg)
|
||||
2. Environment Variable (CONSUL_HTTP_ADDR)
|
||||
3. Default (http://localhost:8500)
|
||||
"""
|
||||
if url_arg:
|
||||
return url_arg
|
||||
|
||||
return os.environ.get("CONSUL_HTTP_ADDR", DEFAULT_CONSUL_URL)
|
||||
Reference in New Issue
Block a user