commit/galaxy-central: dannon: Relocate uwsgi test to the beginning of config, since this might affect other config options down the road.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/c494ee616c1a/ Changeset: c494ee616c1a User: dannon Date: 2015-02-06 16:40:47+00:00 Summary: Relocate uwsgi test to the beginning of config, since this might affect other config options down the road. Affected #: 1 file diff -r 015395841d805061261913e92d408121766e470b -r c494ee616c1aafa755e4d80b893697623e4431bb lib/galaxy/config.py --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -50,6 +50,19 @@ os.umask( self.umask ) # can't get w/o set, so set it back self.gid = os.getgid() # if running under newgrp(1) we'll need to fix the group of data created on the cluster + # TEST FOR UWSGI + self.is_uwsgi = False + try: + # The uwsgi module is automatically injected by the parent uwsgi + # process and only exists that way. If anything works, this is a + # uwsgi-managed process. + import uwsgi + if uwsgi.numproc: + self.is_uwsgi = True + except ImportError: + # This is not a uwsgi process, or something went horribly wrong. + pass + # Database related configuration self.database = resolve_path( kwargs.get( "database_file", "database/universe.sqlite" ), self.root ) self.database_connection = kwargs.get( "database_connection", False ) @@ -428,18 +441,6 @@ self.citation_cache_type = kwargs.get( "citation_cache_type", "file" ) self.citation_cache_data_dir = self.resolve_path( kwargs.get( "citation_cache_data_dir", "database/citations/data" ) ) self.citation_cache_lock_dir = self.resolve_path( kwargs.get( "citation_cache_lock_dir", "database/citations/locks" ) ) - # TEST FOR UWSGI - self.is_uwsgi = False - try: - # The uwsgi module is automatically injected by the parent uwsgi - # process and only exists that way. If anything works, this is a - # uwsgi-managed process. - import uwsgi - if uwsgi.numproc: - self.is_uwsgi = True - except ImportError: - # This is not a uwsgi process, or something went horribly wrong. - pass @property def sentry_dsn_public( self ): Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org