Skip to content

Commit

Permalink
update data loader
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhealy1 committed Mar 2, 2024
1 parent eade6e9 commit 504a425
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions data_loader/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@
import click
import requests

if len(sys.argv) != 2:
print("Usage: python data_loader.py <opensearch|elasticsearch>")
if len(sys.argv) != 1:
print("Usage: python data_loader.py")
sys.exit(1)

DATA_DIR = os.path.join(os.path.dirname(__file__), "setup_data/")

backend = sys.argv[1].lower()
if backend == "opensearch":
STAC_API_BASE_URL = "http://localhost:8082"
elif backend == "elasticsearch":
STAC_API_BASE_URL = "http://localhost:8080"
else:
print("Invalid backend tag. Enter either 'opensearch' or 'elasticsearch'.")
STAC_API_BASE_URL = "http://localhost:8084"


def load_data(filename):
Expand Down

0 comments on commit 504a425

Please sign in to comment.