Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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, manager, delay=0.5):
Transaction.__init__(self)
self._trManager = manager
self._size = 1
self._flush_count = 0
self._endpoint = 'https://example.com'
self._api_key = 'a' * 32
self.delay = delay
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, headers, msg_type=""):
self._data = data
self._headers = headers
self._headers['SD-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 agent_key in self._endpoints[endpoint]:
transaction = copy.copy(self)
transaction._endpoint = endpoint
transaction._agent_key = agent_key
self._trManager.append(transaction)
log.debug("Created transaction %d" % transaction.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()