allow picking pu ES_HOST from env varl

This commit is contained in:
gmega 2023-11-14 10:50:32 -03:00
parent db92220a9c
commit 71c40244d3
No known key found for this signature in database
GPG Key ID: FFD8DAF00660270F
1 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
import os
from argparse import ArgumentParser
from enum import Enum
from typing import List, Iterable
@ -64,7 +65,7 @@ def main():
parser.add_argument(
'--es-host',
help='ElasticSearch URL (defaults to http://localhost:9200)',
default='http://localhost:9200'
default=os.environ.get('ES_HOST', 'http://localhost:9200')
)
subparsers = parser.add_subparsers(title='Command', required=True)