From 0ab80d5dfd908e569311505591c6612b1a5a8be2 Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Tue, 16 Aug 2022 18:12:43 -0400 Subject: [PATCH] Don't use gunicorn logging options with unicornherder, use Galaxy's python logging config instead, so that rotation can be performed. --- gravity/state.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gravity/state.py b/gravity/state.py index 0716630..e2397ab 100644 --- a/gravity/state.py +++ b/gravity/state.py @@ -84,13 +84,16 @@ class GalaxyUnicornHerderService(Service): " -k galaxy.webapps.galaxy.workers.Worker" \ " -b {gunicorn[bind]}" \ " --workers={gunicorn[workers]}" \ - " --access-logfile {log_dir}/gunicorn.access.log" \ - " --error-logfile {log_dir}/gunicorn.error.log --capture-output" \ " --config python:galaxy.web_stack.gunicorn_config" \ " {gunicorn[preload]}" \ " {gunicorn[extra_args]}" - get_environment = GalaxyGunicornService.get_environment + def get_environment(self): + environment = self.default_environment.copy() + if sys.platform == 'darwin': + environment["OBJC_DISABLE_INITIALIZE_FORK_SAFETY"] = "YES" + environment["GALAXY_CONFIG_LOG_DESTINATION"] = "{log_dir}/gunicorn.log" + return environment class GalaxyCeleryService(Service):