Skip to content

Commit d267fff

Browse files
authored
Merge pull request #18 from getsentry/iw/sentry-flush
fix(cli): Adding atexit handler to avoid sending sentry logs to console
2 parents 52278fe + 63e6f9e commit d267fff

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import argparse
4+
import atexit
45

56
import sentry_sdk
67
from commands import list_dependencies
@@ -21,6 +22,11 @@
2122
)
2223

2324

25+
@atexit.register
26+
def cleanup() -> None:
27+
sentry_sdk.flush()
28+
29+
2430
def main() -> None:
2531
parser = argparse.ArgumentParser(
2632
description="DevServices CLI tool for managing Docker Compose services."

0 commit comments

Comments
 (0)