We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55df6eb commit 7743a37Copy full SHA for 7743a37
1 file changed
flagsmith/analytics.py
@@ -1,3 +1,4 @@
1
+import atexit
2
import json
3
import logging
4
import threading
@@ -210,8 +211,10 @@ def _handle_flush_result(
210
211
212
def start(self) -> None:
213
self._schedule_flush()
214
+ atexit.register(self.stop)
215
216
def stop(self) -> None:
217
+ atexit.unregister(self.stop)
218
if self._timer is not None:
219
self._timer.cancel()
220
self.flush()
0 commit comments