diff --git a/lib/galaxy/config.py b/lib/galaxy/config.py index d03d1e3b335..b16140462b1 100644 --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -105,6 +105,7 @@ class Configuration( object ): self.smtp_server = kwargs.get( 'smtp_server', None ) self.smtp_username = kwargs.get( 'smtp_username', None ) self.smtp_password = kwargs.get( 'smtp_password', None ) + self.track_jobs_in_database = kwargs.get( 'track_jobs_in_database', None ) self.start_job_runners = kwargs.get( 'start_job_runners', None ) self.expose_dataset_path = string_as_bool( kwargs.get( 'expose_dataset_path', 'False' ) ) # External Service types used in sample tracking @@ -210,9 +211,12 @@ class Configuration( object ): self.job_handlers = [ x.strip() for x in kwargs.get('job_handlers', self.server_name).split(',') ] self.default_job_handlers = [ x.strip() for x in kwargs.get('default_job_handlers', ','.join( self.job_handlers ) ).split(',') ] # Use database for IPC unless this is a standalone server (or multiple servers doing self dispatching in memory) - self.track_jobs_in_database = True - if ( len( self.job_handlers ) == 1 ) and ( self.job_handlers[0] == self.server_name ) and ( self.job_manager == self.server_name ): - self.track_jobs_in_database = False + if self.track_jobs_in_database is None or self.track_jobs_in_database == "None": + self.track_jobs_in_database = True + if ( len( self.job_handlers ) == 1 ) and ( self.job_handlers[0] == self.server_name ) and ( self.job_manager == self.server_name ): + self.track_jobs_in_database = False + else: + self.track_jobs_in_database = string_as_bool( self.track_jobs_in_database ) # Store per-tool runner configs self.tool_handlers = self.__read_tool_job_config( global_conf_parser, 'galaxy:tool_handlers', 'name' ) self.tool_runners = self.__read_tool_job_config( global_conf_parser, 'galaxy:tool_runners', 'url' ) diff --git a/universe_wsgi.ini.sample b/universe_wsgi.ini.sample index 9b1eab43a16..a9bf50c4506 100644 --- a/universe_wsgi.ini.sample +++ b/universe_wsgi.ini.sample @@ -586,6 +586,15 @@ use_interactive = True # used for jobs without explicit handlers. #default_job_handlers = main +# In multiprocess configurations, notification between processes about new jobs +# is done via the database. In single process configurations, this is done in +# memory, which is a bit quicker. Galaxy tries to automatically determine +# which method it should used based on your manager/handler configuration +# above, but can't reliably determine if you have multiple processes for web +# servers but only a single process as a manager/handler. In that scenario, +# you can override the tracking method by setting the following to True: +#track_jobs_in_database = None + # This enables splitting of jobs into tasks, if specified by the particular tool config. # This is a new feature and not recommended for production servers yet. #use_tasked_jobs = False