-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #570 from 4dn-dcic/ajs_upd_st_mismatch
Refactor status mismatch check
- Loading branch information
Showing
7 changed files
with
751 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import os | ||
from typing import Optional | ||
from dcicutils.es_utils import create_es_client | ||
from dcicutils import ff_utils | ||
|
||
def get_es_metadata(*args, **kwargs): | ||
if (kwargs.get("es_client", None) is None) and ((es_host_local := _get_es_host_local()) is not None): | ||
es_client = create_es_client(es_host_local, use_aws_auth=True) | ||
return ff_utils.get_es_metadata(*args, **kwargs, es_client=es_client) | ||
return ff_utils.get_es_metadata(*args, **kwargs) | ||
|
||
|
||
def _get_es_host_local() -> Optional[str]: | ||
return os.environ.get("ES_HOST_LOCAL", None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.