Skip to content

Commit d424282

Browse files
committed
chore: drop explanatory comments
beep boop
1 parent 5bca88b commit d424282

4 files changed

Lines changed: 0 additions & 10 deletions

File tree

flagsmith/polling_manager.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,10 @@ def __init__(
2424
self.refresh_interval_seconds = refresh_interval_seconds
2525

2626
def run(self) -> None:
27-
# Wait on the stop event rather than sleeping so stop() interrupts
28-
# the interval immediately and the thread can be joined promptly.
2927
while not self._stop_event.is_set():
3028
try:
3129
self.main.update_environment()
3230
except Exception:
33-
# Never let an unexpected error kill the polling thread; log
34-
# it and try again on the next interval.
3531
logger.exception("Error updating environment")
3632
self._stop_event.wait(self.refresh_interval_seconds)
3733

flagsmith/streaming_manager.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ def run(self) -> None:
4141
self.on_event(map_sse_event_to_stream_event(event))
4242

4343
except Exception:
44-
# Never let an unexpected error kill the stream thread; log it
45-
# and reconnect on the next loop iteration.
4644
logger.exception("Error opening or reading from the event stream")
4745

4846
def stop(self) -> None:

tests/conftest.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ def tracking_init(self: Flagsmith, *args: typing.Any, **kwargs: typing.Any) -> N
4040

4141
monkeypatch.setattr(Flagsmith, "__init__", tracking_init)
4242
yield
43-
# Join, not just stop: pyfakefs is not thread-safe, so a thread that is
44-
# still winding down races with the filesystem patching the next test
45-
# performs (and, under pytest>=8.1, surfaces as a thread-exception error).
4643
for flagsmith in instances:
4744
if polling := getattr(
4845
flagsmith, "environment_data_polling_manager_thread", None

tests/test_flagsmith.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,6 @@ def test_stream_used_when_enable_realtime_updates_is_true(
798798
requests_session_response_ok: None, server_api_key: str, mocker: MockerFixture
799799
) -> None:
800800
# Given
801-
# Keep the stream worker off the network so it stays idle until torn down.
802801
mocker.patch(
803802
"flagsmith.streaming_manager.requests.get",
804803
side_effect=requests.exceptions.ReadTimeout(),

0 commit comments

Comments
 (0)