From de8ef7609294d62fd5e1383cba7462bbc8a771c8 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 13 Apr 2021 10:07:59 +0200 Subject: [PATCH] Make sure web handlers don't become job handlers if handlers section exists And add a default pool, so that exisiting job setups that don't specify a pool (for instance those that previously used db-preassign) will just continue working. --- lib/galaxy/web_stack/handlers.py | 4 ++-- scripts/galaxy_main.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/galaxy/web_stack/handlers.py b/lib/galaxy/web_stack/handlers.py index a3adc3b4d39..14a14a5428d 100644 --- a/lib/galaxy/web_stack/handlers.py +++ b/lib/galaxy/web_stack/handlers.py @@ -251,8 +251,8 @@ class ConfiguresHandlers: for collection in self.handlers.values(): if self.app.config.server_name in collection: return True - if not self.handlers and (not self.handler_assignment_methods_configured - and HANDLER_ASSIGNMENT_METHODS.DB_TRANSACTION_ISOLATION in self.handler_assignment_methods + if not self.handlers and not self.handler_assignment_methods_configured \ + and (HANDLER_ASSIGNMENT_METHODS.DB_TRANSACTION_ISOLATION in self.handler_assignment_methods or HANDLER_ASSIGNMENT_METHODS.DB_SKIP_LOCKED in self.handler_assignment_methods): return True return False diff --git a/scripts/galaxy_main.py b/scripts/galaxy_main.py index c6a49f20bcc..1a2f44021d4 100755 --- a/scripts/galaxy_main.py +++ b/scripts/galaxy_main.py @@ -194,7 +194,7 @@ class GalaxyConfigBuilder: arg_parser.add_argument("--log-file", default=None, help="Galaxy log file (overrides log configuration in config_file if set)") arg_parser.add_argument("--pid-file", default=DEFAULT_PID, help="pid file (default is %s)" % DEFAULT_PID) arg_parser.add_argument("--server-name", default=None, help="set a galaxy server name") - arg_parser.add_argument("--attach-to-pool", action="append", default=None, help="attach to asynchronous worker pool (specify multiple times for multiple pools)") + arg_parser.add_argument("--attach-to-pool", action="append", default=['job-handlers'], help="attach to asynchronous worker pool (specify multiple times for multiple pools)") @property def config_is_ini(self):