Skip to content

Commit

Permalink
Merge pull request #134 from SynBioDex/133-sbolexplorer-memory-leak
Browse files Browse the repository at this point in the history
change the flask decorator
  • Loading branch information
cl117 authored Nov 13, 2024
2 parents 8107447 + ce7a820 commit 3c325f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flask/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"uclust_identity": "0.8",
"elasticsearch_index_name": "part",
"pagerank_tolerance": "0.0001",
"elasticsearch_endpoint": "http://elasticsearch:9200/",
"elasticsearch_endpoint": "http://localhost:9200/",
"sparql_endpoint": "http://localhost:8890/sparql?",
"last_update_start": "none",
"last_update_end": "none",
Expand Down
3 changes: 2 additions & 1 deletion flask/explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def handle_error(e):
return jsonify(error=str(e.name + ": " + e.description)), e.code
return jsonify(error=str(type(e).__name__) + str(e)), 500

@app.before_request
def startup():
def auto_update_index():
update_interval = int(config_manager.load_config().get('updateTimeInDays', 0)) * 86400
Expand Down Expand Up @@ -69,6 +68,8 @@ def auto_update_index():
except Exception as e:
log.error(f'Error during startup: {e}')
raise

startup()

def update_index():
logger_.log('============ STARTING INDEXING ============\n\n', True)
Expand Down

0 comments on commit 3c325f9

Please sign in to comment.