mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-03 12:16:10 +00:00
refactor: apply code review remarks
This commit is contained in:
parent
ee1e36219a
commit
457b0c0a2e
@ -83,7 +83,7 @@ class DatasetTreeBuilder:
|
||||
def saveTreeInElasticSearchIfApplicable(args):
|
||||
es_url = args.get(Constant.WH_ELASTICSEARCH_URL_KEY, None)
|
||||
es_port = args.get(Constant.WH_ELASTICSEARCH_PORT_KEY, None)
|
||||
if es_url is not None and es_port is not None:
|
||||
if es_url and es_port:
|
||||
esi = ElasticSearchIndex(args)
|
||||
d = datetime.utcnow()
|
||||
unixtime = calendar.timegm(d.utctimetuple())
|
||||
|
||||
@ -86,7 +86,7 @@ class FlowTreeBuilder:
|
||||
def saveTreeInElasticSearchIfApplicable(args):
|
||||
es_url = args.get(Constant.WH_ELASTICSEARCH_URL_KEY, None)
|
||||
es_port = args.get(Constant.WH_ELASTICSEARCH_PORT_KEY, None)
|
||||
if es_url is not None and es_port is not None:
|
||||
if es_url and es_port:
|
||||
esi = ElasticSearchIndex(args)
|
||||
d = datetime.utcnow()
|
||||
unixtime = calendar.timegm(d.utctimetuple())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user