Returns the default WSGI handler for the runner.
776646
def get_handler(self, *args, **options):
        
        handler = get_internal_wsgi_application()
        from django.contrib.staticfiles.handlers import StaticFilesHandler
        return StaticFilesHandler(handler)
253811
def get_default_config(self):
        
        config = super(TwemproxyCollector, self).get_default_config()
        config.update({
            'path':     'twemproxy',
            'hosts': ['localhost:22222']
        })
        return config
58491
def get_default_config(self):
        
        config = super(InfluxdbHandler, self).get_default_config()

        config.update({
            'hostname': 'localhost',
            'port': 8086,
            'ssl': False,
            'username': 'root',
            'password': 'root',
            'database': 'graphite',
            'batch_size': 1,
            'cache_size': 20000,
            'time_precision': 's',
        })

        return config
642811
def default_run_conf(self):
        '''
        '''
        default_run_conf = namedtuple('default_run_conf', field_names=self._default_run_conf.keys())
        return default_run_conf(**self._default_run_conf)
790495
def get_default_config(self):
        
        config = super(RiemannHandler, self).get_default_config()

        config.update({
            'host': '',
            'port': 123,
            'transport': 'tcp',
        })

        return config
51528
def get_handler(self, *args, **options):
        
        handler = super(Command, self).get_handler(*args, **options)
        insecure_serving = options.get('insecure_serving', False)
        if self.should_use_static_handler(options):
            return StaticFilesHandler(handler)
        return handler
642887
def handle_one_request(self):
        """"""
        self.raw_requestline = self.rfile.readline()
        if not self.raw_requestline:
            self.close_connection = 1
        elif self.parse_request():
            return self.run_wsgi()
575221
def get_default_config(self):
        
        default_config = super(SNMPRawCollector,
                               self).get_default_config()
        default_config.update({
            'oids': {},
            'path_prefix': 'servers',
            'path_suffix': 'snmp',
        })
        return default_config
1369898
def defaultCrawlId():
    

    timestamp = datetime.now().isoformat().replace(':', '_')
    user = getuser()
    return '_'.join(('crawl', user, timestamp))
772307
def run(self, handler):
        """"""
        import eventlet.patcher
        if not eventlet.patcher.is_monkey_patched(os):
            msg = ("%s requires eventlet.monkey_patch() (before "
                   "import)" % self.__class__.__name__)
            raise RuntimeError(msg)

        # Separate out wsgi.server arguments
        wsgi_args = {}
        for arg in ('log', 'environ', 'max_size', 'max_http_version',
                    'protocol', 'server_event', 'minimum_chunk_size',
                    'log_x_forwarded_for', 'custom_pool', 'keepalive',
                    'log_output', 'log_format', 'url_length_limit', 'debug',
                    'socket_timeout', 'capitalize_response_headers'):
            try:
                wsgi_args[arg] = self.options.pop(arg)
            except KeyError:
                pass
        if 'log_output' not in wsgi_args:
            wsgi_args['log_output'] = not self.quiet

        import eventlet.wsgi
        sock = self.options.pop('shared_socket', None) or self.get_socket()
        eventlet.wsgi.server(sock, handler, **wsgi_args)
175033
def run(self):
        
        server_address = (self.host, self.port)
        threading = True
        if threading:
            httpd_cls = type('WSGIServer', (ThreadingMixIn, WSGIServer), {})
        else:
            httpd_cls = WSGIServer
        self.httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=False)
        wsgi_handler = get_internal_wsgi_application()
        self.httpd.set_app(wsgi_handler)
        self.is_ready.set()
        self.httpd.serve_forever()
946296
def default_subprocess_runner(cmd, cwd=None, extra_environ=None):
    """"""
    env = os.environ.copy()
    if extra_environ:
        env.update(extra_environ)

    check_call(cmd, cwd=cwd, env=env)
1229753
def default(request):
    
    protocol = request.is_secure() and 'wss://' or 'ws://'
    heartbeat_msg = settings.WS4REDIS_HEARTBEAT and '"{0}"'.format(settings.WS4REDIS_HEARTBEAT) or 'null'
    context = {
        'WEBSOCKET_URI': protocol + request.get_host() + settings.WEBSOCKET_URL,
        'WS4REDIS_HEARTBEAT': mark_safe(heartbeat_msg),
    }
    return context
284254
def _default(cls, opts):
        """"""
        level = getattr(logging, opts.log_level, logging.DEBUG)

        logger = logging.getLogger('luigi-interface')
        logger.setLevel(level)

        stream_handler = logging.StreamHandler()
        stream_handler.setLevel(level)

        formatter = logging.Formatter('%(levelname)s: %(message)s')
        stream_handler.setFormatter(formatter)

        logger.addHandler(stream_handler)
        return True
1229059
def get_default_config(self):
        
        config = super(TSDBHandler, self).get_default_config()

        config.update({
            'host': '127.0.0.1',
            'port': 4242,
            'timeout': 5,
            'tags': '',
            'prefix': '',
            'batch': 1,
            'compression': 0,
            'user': '',
            'password': '',
            'cleanMetrics': True,
            'skipAggregates': True,
        })

        return config
388573
def get_default_config(self):
        
        config = super(rmqHandler, self).get_default_config()

        config.update({
            'server': '127.0.0.1',
            'rmq_exchange': 'diamond',
        })

        return config
982166
def u2handlers(self):
    
    # Start with the default set of handlers.
    return_handlers = suds.transport.http.HttpTransport.u2handlers(self)
    return_handlers.extend(self.handlers)

    return return_handlers