def start_backoff(self):
        self.state = BACKOFF

        for conn in self.conns:
            try:
                conn.ready(0)
            except NSQSocketError as error:
                self.logger.warn('[%s] RDY 0 failed (%r)' % (conn, error))

        interval = self.backoff.get_interval()
        self.logger.info('backing off for %s seconds' % interval)
        gevent.sleep(interval)

        self.state = THROTTLED

        conn = self.random_connection()
        if not conn:
            return

        self.logger.info('[%s] testing backoff state with RDY 1' % conn)
        self.send_ready(conn, 1)
dataset/ETHPy150Open wtolson/gnsq/gnsq/reader.py/Reader.start_backoff/original