|
@ -48,6 +48,11 @@ class LogzioSender: |
|
|
self.queue = queue.Queue() |
|
|
self.queue = queue.Queue() |
|
|
self._initialize_sending_thread() |
|
|
self._initialize_sending_thread() |
|
|
|
|
|
|
|
|
|
|
|
def __del__(self): |
|
|
|
|
|
del self.logger |
|
|
|
|
|
del self.backup_logs |
|
|
|
|
|
del self.queue |
|
|
|
|
|
|
|
|
def _initialize_sending_thread(self): |
|
|
def _initialize_sending_thread(self): |
|
|
self.sending_thread = Thread(target=self._drain_queue) |
|
|
self.sending_thread = Thread(target=self._drain_queue) |
|
|
self.sending_thread.daemon = False |
|
|
self.sending_thread.daemon = False |
|
@ -153,6 +158,8 @@ class LogzioSender: |
|
|
'backing up to local file system', number_of_retries) |
|
|
'backing up to local file system', number_of_retries) |
|
|
backup_logs(logs_list, self.logger) |
|
|
backup_logs(logs_list, self.logger) |
|
|
|
|
|
|
|
|
|
|
|
del logs_list |
|
|
|
|
|
|
|
|
def _get_messages_up_to_max_allowed_size(self): |
|
|
def _get_messages_up_to_max_allowed_size(self): |
|
|
logs_list = [] |
|
|
logs_list = [] |
|
|
current_size = 0 |
|
|
current_size = 0 |
|
|