Skip to content

Commit

Permalink
Removing check_unset_env_vars
Browse files Browse the repository at this point in the history
Removing the functionality of check_unset_env_vars. DB_HOST should be caught in start_script.sh. When I rebuilt the image without this functionality and ran the container, all tests passed.
  • Loading branch information
nataliejschultz committed May 17, 2024
1 parent 738b629 commit a0f2424
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions emission/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,12 @@ def get_config_data_from_env():
}
return config_data_env

def check_unset_env_vars():
config_data_env = {
"timeseries": {
"url": os.getenv('DB_HOST'),
"result_limit": os.getenv('DB_TS_RESULT_LIMIT')
}
}
return not any(config_data_env.values())

def get_config_data():
try:
config_file = open('conf/storage/db.conf')
ret_val = json.load(config_file)
config_file.close()
except:
# Check if all DB environment variables are not set
# if check_unset_env_vars():
# print("All DB environment variables are set to None")
ret_val = get_config_data_from_env()
if ret_val["timeseries"]["url"] == "localhost":
print("storage not configured, falling back to sample, default configuration")
Expand Down

0 comments on commit a0f2424

Please sign in to comment.