docs: def poll(self):
          """
          Main loop which maintains the node in the hash ring. Can be run in a
          greenlet or separate thread. This takes care of:
  
          * Updating the heartbeat
          * Checking for ring updates
          * Cleaning up expired nodes periodically
          """
  
          pubsub = self.conn.pubsub()
          pubsub.subscribe(self.key)
  
          # Pubsub messages generator
          gen = pubsub.listen()
  
          last_heartbeat = time.time()
          self.heartbeat()
  
          last_cleanup = time.time()
          self.cleanup()
  
          try:
              while True:
                  # Since Redis' listen method blocks, we use select to inspect the
                  # underlying socket to see if there is activity.
                  fileno = pubsub.connection._sock.fileno()
                  timeout = max(0, POLL_INTERVAL - (time.time() - last_heartbeat))
                  r, w, x = self._select([fileno], [], [], timeout)
                  if fileno in r:
                      next(gen)
                      self.update()
  
                  last_heartbeat = time.time()
                  self.heartbeat()
  
                  now = time.time()
                  if now - last_cleanup > CLEANUP_INTERVAL:
                      last_cleanup = now
                      self.cleanup()
          finally:
              pubsub.close()