Skip to content

Commit d11cd15

Browse files
committed
docs: Simplify event processor comment wording
1 parent 8d0005a commit d11cd15

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎ldclient/impl/events/async_event_processor.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,9 @@ async def _run_main_loop(self):
133133
elif message.type == 'diagnostic':
134134
self._send_and_reset_diagnostics()
135135
elif message.type == 'flush_and_wait':
136-
# Ensure the buffered batch is actually handed to a worker
137-
# before reporting success; under saturation the first
138-
# trigger may leave the events buffered, so wait for a free
139-
# worker and retry.
136+
# Do not report success until a worker takes the batch.
137+
# When all workers are busy, the first trigger leaves the
138+
# events buffered, so wait for a free worker and try again.
140139
while not self._trigger_flush():
141140
await self._flush_workers.wait()
142141
await self._flush_workers.wait()

‎ldclient/impl/events/event_processor_common.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def clear(self):
8989

9090

9191
class EventOutputFormatter:
92-
"""Transforms buffered events into the LaunchDarkly wire-format output payload. Performs no I/O."""
92+
"""Transforms buffered events into the output payload sent to LaunchDarkly. Performs no I/O."""
9393

9494
def __init__(self, config: PrivateAttributesConfig):
9595
self._context_formatter = EventContextFormatter(

0 commit comments

Comments
 (0)