Python gunicorn.six.iteritems() Examples

The following are 19 code examples of gunicorn.six.iteritems(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module gunicorn.six , or try the search function .
Example #1
Source File: __init__.py    From brozzler with Apache License 2.0 5 votes vote down vote up
def load_config(self):
            config = dict(
                    [(key, value) for key, value in iteritems(self.options)
                        if key in self.cfg.settings and value is not None])
            for key, value in iteritems(config):
                self.cfg.set(key.lower(), value)
            self.cfg.set("logger_class", BypassGunicornLogging)
            self.cfg.set("accesslog", "dummy-value") 
Example #2
Source File: run.py    From augur with MIT License 5 votes vote down vote up
def load_config(self):
        """
        Sets the values for configurations
        """
        config = dict([(key, value) for key, value in iteritems(self.options)
                       if key in self.cfg.settings and value is not None])
        for key, value in iteritems(config):
            self.cfg.set(key.lower(), value) 
Example #3
Source File: app.py    From conu with GNU General Public License v3.0 5 votes vote down vote up
def load_config(self):
        config = dict([(key, value) for key, value in iteritems(self.options)
                       if key in self.cfg.settings and value is not None])
        for key, value in iteritems(config):
            self.cfg.set(key.lower(), value) 
Example #4
Source File: app.py    From conu with GNU General Public License v3.0 5 votes vote down vote up
def load_config(self):
        config = dict([(key, value) for key, value in iteritems(self.options)
                       if key in self.cfg.settings and value is not None])
        for key, value in iteritems(config):
            self.cfg.set(key.lower(), value) 
Example #5
Source File: serve.py    From sagemaker-rl-container with Apache License 2.0 5 votes vote down vote up
def load_config(self):
        """Load configuration.

        Configuration is loaded from the options passed in the constructor,
        and then load arguments from the CLI and the environment variable GUNICORN_CMD_ARGS.
        Arguments in the environment variable take precedence.

        See http://docs.gunicorn.org/en/stable/settings.html
        """
        for key, value in iteritems(self.options):
            key = key.lower()
            if key in self.cfg.settings and value is not None:
                self.cfg.set(key, value)
        self.load_vars() 
Example #6
Source File: runner.py    From sharq-server with MIT License 5 votes vote down vote up
def load_config(self):
        config = dict([(key, value) for key, value in iteritems(self.options)
                       if key in self.cfg.settings and value is not None])
        for key, value in iteritems(config):
            self.cfg.set(key.lower(), value) 
Example #7
Source File: flask_gunicorn.py    From flask-gunicorn with MIT License 5 votes vote down vote up
def load_config(self):
        config = dict([(key, value) for key, value in iteritems(self.options)
                       if key in self.cfg.settings and value is not None])
        for key, value in iteritems(config):
            self.cfg.set(key.lower(), value) 
Example #8
Source File: deploy_nix.py    From paperboy with Apache License 2.0 5 votes vote down vote up
def load_config(self):
        config = dict([(key, value) for key, value in iteritems(self.options)
                       if key in self.cfg.settings and value is not None])
        for key, value in iteritems(config):
            self.cfg.set(key.lower(), value) 
Example #9
Source File: diagd.py    From ambassador with Apache License 2.0 5 votes vote down vote up
def load_config(self):
        config = dict([(key, value) for key, value in iteritems(self.options)
                       if key in self.cfg.settings and value is not None])
        for key, value in iteritems(config):
            self.cfg.set(key.lower(), value) 
Example #10
Source File: server.py    From curldrop with MIT License 5 votes vote down vote up
def load_config(self):
        config = dict(
            [
                (key, value)
                for key, value in iteritems(self.options)
                if key in self.cfg.settings and value is not None
            ]
        )
        for key, value in iteritems(config):
            self.cfg.set(key.lower(), value) 
Example #11
Source File: gunicorn_server.py    From python-pool-performance with MIT License 5 votes vote down vote up
def load_config(self):
        config = dict([(key, value) for key, value in iteritems(self.options)
                       if key in self.cfg.settings and value is not None])
        for key, value in iteritems(config):
            self.cfg.set(key.lower(), value) 
Example #12
Source File: server.py    From training_results_v0.5 with Apache License 2.0 5 votes vote down vote up
def load_config(self):
    """Loads the configuration."""
    config = dict([(key, value) for key, value in iteritems(self.options)
                   if key in self.cfg.settings and value is not None])
    for key, value in iteritems(config):
      self.cfg.set(key.lower(), value) 
Example #13
Source File: gunicorn_app.py    From open_dnsdb with Apache License 2.0 5 votes vote down vote up
def load_config(self):
        config = dict([(key, value) for key, value in iteritems(self.options)
                       if key in self.cfg.settings and value is not None])
        config['logger_class'] = GunicornLogger
        for key, value in iteritems(config):
            self.cfg.set(key.lower(), value) 
Example #14
Source File: server.py    From BERT with Apache License 2.0 5 votes vote down vote up
def load_config(self):
    """Loads the configuration."""
    config = dict([(key, value) for key, value in iteritems(self.options)
                   if key in self.cfg.settings and value is not None])
    for key, value in iteritems(config):
      self.cfg.set(key.lower(), value) 
Example #15
Source File: server.py    From tensor2tensor with Apache License 2.0 5 votes vote down vote up
def load_config(self):
    """Loads the configuration."""
    config = dict([(key, value) for key, value in iteritems(self.options)
                   if key in self.cfg.settings and value is not None])
    for key, value in iteritems(config):
      self.cfg.set(key.lower(), value) 
Example #16
Source File: gunicorn_app.py    From appr with Apache License 2.0 5 votes vote down vote up
def load_config(self):
        config = dict([(key, value) for key, value in iteritems(vars(self.args_options))
                       if key in self.cfg.settings and value is not None])
        for key, value in iteritems(self.defaults):
            config[key] = value
        for key, value in iteritems(config):
            self.cfg.set(key.lower(), value) 
Example #17
Source File: manager.py    From flask-restful-example with MIT License 5 votes vote down vote up
def load_config(self):
        config = dict([(key, value) for key, value in iteritems(self.options)
                       if key in self.cfg.settings and value is not None])
        for key, value in iteritems(config):
            self.cfg.set(key.lower(), value) 
Example #18
Source File: serve.py    From sagemaker-xgboost-container with Apache License 2.0 5 votes vote down vote up
def load_config(self):
        for key, value in iteritems(self.options):
            key = key.lower()
            if key in self.cfg.settings and value is not None:
                self.cfg.set(key, value) 
Example #19
Source File: server.py    From fine-lm with MIT License 5 votes vote down vote up
def load_config(self):
    """Loads the configuration."""
    config = dict([(key, value) for key, value in iteritems(self.options)
                   if key in self.cfg.settings and value is not None])
    for key, value in iteritems(config):
      self.cfg.set(key.lower(), value)