mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Handle exceptions when building the app (without a try block, you have to manually kill the process if there's an exception during startup)
This commit is contained in:
@@ -51,8 +51,13 @@ def app_factory( global_conf, **kwargs ):
|
||||
if 'app' in kwargs:
|
||||
app = kwargs.pop( 'app' )
|
||||
else:
|
||||
from galaxy.app import UniverseApplication
|
||||
app = UniverseApplication( global_conf = global_conf, **kwargs )
|
||||
try:
|
||||
from galaxy.app import UniverseApplication
|
||||
app = UniverseApplication( global_conf = global_conf, **kwargs )
|
||||
except:
|
||||
import traceback, sys
|
||||
traceback.print_exc()
|
||||
sys.exit( 1 )
|
||||
atexit.register( app.shutdown )
|
||||
# Create the universe WSGI application
|
||||
webapp = galaxy.web.framework.WebApplication( app, session_cookie='galaxysession' )
|
||||
|
||||
Reference in New Issue
Block a user