Skip to content

Commit

Permalink
Removed connection cache
Browse files Browse the repository at this point in the history
  • Loading branch information
carlvitzthum committed Nov 30, 2017
1 parent 68c3323 commit 519c9e7
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
)

ENVIRONMENTS = {}
CACHED = {}
PROD_ADDRESS = 'https://data.4dnucleome.org/'
# set environmental variables in .chalice/config.json
STAGE = os.environ.get('chalice_stage', 'dev') # default to dev
Expand Down Expand Up @@ -84,12 +83,7 @@ def init_connection(environ):
'checks': {}
}
return None, error_res
try:
connection = CACHED[environ]
except KeyError:
info = ENVIRONMENTS[environ]
CACHED[environ] = FSConnection(environ, info)
connection = CACHED[environ]
connection = FSConnection(environ, ENVIRONMENTS[environ])
if not connection.is_up:
error_res = {
'status': 'error',
Expand Down

0 comments on commit 519c9e7

Please sign in to comment.