def __init__(self, conf): self.conf = conf self.conf.register_opts(_GENERAL_OPTIONS) self.conf.register_opts(_DRIVER_OPTIONS, group=_DRIVER_GROUP) self.driver_conf = self.conf[_DRIVER_GROUP] log.setup('marconi')
def _wrapper(): try: logging.setup('marconi') func() except KeyboardInterrupt: LOG.info(_(u'Terminating')) except Exception as ex: _fail(1, ex)
def __init__(self, conf): self.conf = conf self.conf.register_opts(_GENERAL_OPTIONS) self.conf.register_opts(_DRIVER_OPTIONS, group=_DRIVER_GROUP) self.driver_conf = self.conf[_DRIVER_GROUP] log.setup('marconi') mode = 'admin' if conf.admin_mode else 'public' self._transport_type = 'marconi.queues.{0}.transport'.format(mode)
def _wrapper(): atexit.register(_enable_echo, True) _enable_echo(False) try: logging.setup('marconi') func() except KeyboardInterrupt: LOG.info(_(u'Terminating')) except Exception as ex: _fail(1, ex)
def _wrapper(): atexit.register(_enable_echo, True) _enable_echo(False) try: logging.setup('marconi') PROJECT_CFG.load(args=sys.argv[1:]) func() except KeyboardInterrupt: LOG.info('Terminating') except Exception as ex: _fail(1, ex)
def __init__(self, access_mode, config_file=None, cli_args=None): default_file = None if config_file is not None: default_file = [config_file] CFG(project='marconi', args=cli_args or [], default_config_files=default_file) log.setup('marconi_proxy') form = 'marconi.proxy.{0}.transport' lookup = {access.Access.public: 'public', access.Access.admin: 'admin'} self._transport_type = form.format(lookup[access_mode])
def __init__(self, config_file=None, cli_args=None): PROJECT_CFG.load(filename=config_file, args=cli_args) log.setup('marconi')