Bugfix: Do not hard code 'main' as Galaxy server name.

Determine correct server name corresponding to at least a web request at runtime.
This commit is contained in:
John Chilton
2014-10-18 18:38:04 -04:00
parent f8ad738b90
commit ea6bc7be5d
@@ -11,7 +11,8 @@ import tempfile
import subprocess
import ConfigParser
galaxy_root_dir = os.path.abspath(trans.app.config.root)
galaxy_config = trans.app.config
galaxy_root_dir = os.path.abspath(galaxy_config.root)
history_id = trans.security.encode_id( trans.history.id )
dataset_id = trans.security.encode_id( hda.id )
@@ -20,10 +21,11 @@ config.read( os.path.join( galaxy_root_dir, 'universe_wsgi.ini' ) )
# uWSGI galaxy installations don't use paster and only speak uWSGI not http
try:
galaxy_paster_port = config.getint('server:main', 'port')
galaxy_paster_port = config.getint('server:%s' % galaxy_config.server_name, 'port')
except:
galaxy_paster_port = None
# Find out where we are
viz_plugin_dir = config.get('app:main', 'visualization_plugins_directory')
if not os.path.isabs(viz_plugin_dir):