(self)
Connect to the statsd server
Connect to the statsd server
Connect to the statsd server
def _connect(self):
        """
        Connect to the statsd server
        """
        if not statsd:
            return

        if hasattr(statsd, 'StatsClient'):
            self.connection = statsd.StatsClient(
                host=self.host,
                port=self.port
            ).pipeline()
        else:
            # Create socket
            self.connection = statsd.Connection(
                host=self.host,
                port=self.port,
                sample_rate=1.0
            )
def _connect ( self ) : if not statsd : return if hasattr ( statsd , 'StatsClient' ) : self . connection = statsd . StatsClient ( host = self . host , port = self . port ) . pipeline ( ) else : # Create socket self . connection = statsd . Connection ( host = self . host , port = self . port , sample_rate = 1.0 )