Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixing blast when run in debug mode on server
  • Loading branch information
proost committed Nov 18, 2016
1 parent f3ac140 commit b171575
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion planet/extensions/blast.py
Expand Up @@ -37,7 +37,9 @@ def init_app(self, app):
app.extensions['flask-blast'] = self

# Check this to make sure the Werkzeug reloader doesn't spawn an extra thread !
if (os.environ.get('WERKZEUG_RUN_MAIN') == 'true' or not app.config['DEBUG']) and not self.running:
if not self.running and (os.environ.get('WERKZEUG_RUN_MAIN') == 'true' or
os.environ.get('WERKZEUG_RUN_MAIN') is None or
not app.config['DEBUG']):
self.commands['blastp'] = app.config['BLASTP_CMD']
self.commands['blastn'] = app.config['BLASTN_CMD']
print(" * Starting Blast thread...", file=sys.stderr)
Expand Down

0 comments on commit b171575

Please sign in to comment.