original_docstring: Add messages to be managed by the leaser.
docstring: Add messages to be managed by the leaser.
docstring_tokens: Add messages to be managed by the leaser .
code: def add(self, items: Iterable[requests.LeaseRequest]) -> None:
          """Add messages to be managed by the leaser."""
          with self._add_remove_lock:
              for item in items:
                  # Add the ack ID to the set of managed ack IDs, and increment
                  # the size counter.
                  if item.ack_id not in self._leased_messages:
                      self._leased_messages[item.ack_id] = _LeasedMessage(
                          sent_time=float("inf"),
                          size=item.byte_size,
                          ordering_key=item.ordering_key,
                      )
                      self._bytes += item.byte_size
                  else:
                      _LOGGER.debug("Message %s is already lease managed", item.ack_id)
code_tokens: def add ( self , items : Iterable [ requests . LeaseRequest ] ) -> None : with self . _add_remove_lock : for item in items : if item . ack_id not in self . _leased_messages : self . _leased_messages [ item . ack_id ] = _LeasedMessage ( sent_time = float ( "inf" ) , size = item . byte_size , ordering_key = item . ordering_key , ) self . _bytes += item . byte_size else : _LOGGER . debug ( "Message %s is already lease managed" , item . ack_id )
short_docstring: Add messages to be managed by the leaser.
short_docstring_tokens: Add messages to be managed by the leaser .
comment: """Add messages to be managed by the leaser."""$SEP$# Add the ack ID to the set of managed ack IDs, and increment$SEP$# the size counter.