Skip to content

Commit

Permalink
os.getenv dot not throw exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Patent2net committed Jul 10, 2021
1 parent b25972c commit 3d94116
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Patent2Net/P2N-Indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
if os.getenv('DEBUG'):
es = Elasticsearch(hosts=[{'host': "127.0.0.1", 'port': 9200}]) # this works only in debug mode
# elastic is reach by docker inter dns name in the image as below
else:
es = Elasticsearch(hosts=[{'host': "elasticsearch", 'port': 9200}])
except:
es = Elasticsearch(hosts=[{'host': "elasticsearch", 'port': 9200}])

Expand Down

0 comments on commit 3d94116

Please sign in to comment.