mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-28 02:58:18 +08:00
Fall back to generic WebApplicationStack
if we're building a web app, but aren't using gunicorn. I don't think this has a big impact currently, since you can only set base pools via lib/galaxy/main.py. I think you could set up alternative logging based on the web stack class though, and this seems cleaner.
This commit is contained in:
@@ -75,6 +75,7 @@ class WebappConfigResolver:
|
||||
self.is_ini_file = config_is_ini(self.config_file)
|
||||
self.config_section = self._resolve_section_name()
|
||||
self._update_kwds()
|
||||
os.environ["IS_WEBAPP"] = "1"
|
||||
|
||||
def resolve_config(self) -> WebappConfig:
|
||||
global_conf = {}
|
||||
|
||||
@@ -291,6 +291,8 @@ def application_stack_class() -> Type[ApplicationStack]:
|
||||
"""
|
||||
if "gunicorn" in os.environ.get("SERVER_SOFTWARE", ""):
|
||||
return GunicornApplicationStack
|
||||
elif os.environ.get("IS_WEBAPP") == "1":
|
||||
return WebApplicationStack
|
||||
return WeblessApplicationStack
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user