Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lzchen committed Oct 19, 2020
1 parent c649ac8 commit 86c2e8a
Showing 1 changed file with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,24 +81,6 @@ def _export(self, batch, event=None): # pragma: NO COVER
if event:
event.set()

def _export(self, batch, event=None): # pragma: NO COVER
try:
if batch:
envelopes = [self.log_record_to_envelope(x) for x in batch]
envelopes = self.apply_telemetry_processors(envelopes)
result = self._transmit(envelopes)
if result > 0:
self.storage.put(envelopes, result)
if event:
if isinstance(event, QueueExitEvent):
self._transmit_from_storage() # send files before exit
return
if len(batch) < self.options.max_batch_size:
self._transmit_from_storage()
finally:
if event:
event.set()

def close(self):
self.storage.close()
self._worker.stop()
Expand Down

0 comments on commit 86c2e8a

Please sign in to comment.