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:
mvdbeek
2022-03-17 21:20:59 +01:00
parent 96879486e2
commit dc75df3b0b
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -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 = {}
+2
View File
@@ -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