Skip to content

Commit 24034a0

Browse files
authored
L-110 Continue flushing after shutdown until pipe is empty (#17)
1 parent b24acd1 commit 24034a0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

logtail/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
from .helpers import LogtailContext, DEFAULT_CONTEXT
66
from .formatter import LogtailFormatter
77

8-
__version__ = '0.2.6'
8+
__version__ = '0.2.7'
99

1010
context = DEFAULT_CONTEXT

logtail/flusher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def step(self):
6767
if response.status_code == 500 and getattr(response, "exception") != None:
6868
print('Failed to send logs to Better Stack after {} retries: {}'.format(len(RETRY_SCHEDULE), response.exception))
6969

70-
if shutdown:
70+
if shutdown and self.pipe.empty():
7171
sys.exit(0)
7272

7373

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from setuptools import setup
44

55

6-
VERSION = '0.2.6'
6+
VERSION = '0.2.7'
77
ROOT_DIR = os.path.dirname(__file__)
88

99
REQUIREMENTS = [

0 commit comments

Comments
 (0)