def __init__(self, size, manager): Transaction.__init__(self) self._trManager = manager self._size = size self._flush_count = 0 self.is_flushable = False
def __init__(self, size, manager): Transaction.__init__(self) self._trManager = manager self._size = size self._flush_count = 0 self._endpoint = 'https://example.com' self._api_key = 'a' * 32 self.is_flushable = False
def __init__(self, data): self._data = data # Call after data has been set (size is computed in Transaction's init) Transaction.__init__(self) # Insert the transaction in the Manager self._trManager.append(self) logging.debug("Created transaction %d" % self.get_id()) self._trManager.flush()
def __init__(self, data, headers): self._data = data self._headers = headers # Call after data has been set (size is computed in Transaction's init) Transaction.__init__(self) # Insert the transaction in the Manager self._trManager.append(self) log.debug("Created transaction %d" % self.get_id()) self._trManager.flush()
def __init__(self, data, headers, msg_type=""): self._data = data self._headers = headers self._headers['DD-Forwarder-Version'] = get_version() self._msg_type = msg_type Transaction.__init__(self) if self._emitter_manager is not None: self._emitter_manager.send(data, headers) self._trManager.append(self) log.debug("Created transaction %d" % self.get_id()) self._trManager.flush()
def __init__(self, data, headers): self._data = data self._headers = headers # Call after data has been set (size is computed in Transaction's init) Transaction.__init__(self) # Emitters operate outside the regular transaction framework if self._emitter_manager is not None: self._emitter_manager.send(data, headers) # Insert the transaction in the Manager self._trManager.append(self) log.debug("Created transaction %d" % self.get_id()) self._trManager.flush()
def __init__(self, data, headers, msg_type=""): self._data = data self._headers = headers self._headers['DD-Forwarder-Version'] = get_version() self._msg_type = msg_type # Call after data has been set (size is computed in Transaction's init) Transaction.__init__(self) # Emitters operate outside the regular transaction framework if self._emitter_manager is not None: self._emitter_manager.send(data, headers) # Insert the transaction(s) in the Manager for endpoint in self._endpoints: for api_key in self._endpoints[endpoint]: transaction = copy.copy(self) transaction._endpoint = endpoint transaction._api_key = api_key self._trManager.append(transaction) log.debug("Created transaction %d" % transaction.get_id()) self._trManager.flush()
def __init__(self, value): adjusted_value = value if value > 0 else value * -1 Transaction.__init__(self, adjusted_value)