Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EventHub] update get_buffered_event_count docstring #24756

Merged
2 commits merged into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,9 +830,12 @@ def close(self, *, flush: bool = True, **kwargs: Any) -> None:
def get_buffered_event_count(self, partition_id: str) -> Optional[int]:
"""
The number of events that are buffered and waiting to be published for a given partition.
Returns None in non-buffered mode. **NOTE: This method should only be used for debugging
purposes. If an invalid `partition_id` is passed in, then a value of 0 will be returned
which may be misleading.**
Returns None in non-buffered mode. **NOTE: The event buffer is processed in a background
thread, therefore the number of events in the buffer reported by this API should be
considered only an approximation and is only recommend for use in debugging. For a
partition ID that has no events buffered, 0 will be returned regardless of whether that
partition ID actually exists within the Event Hub.**
:param str partition_id: The target partition ID.
:rtype: int or None
Expand All @@ -851,10 +854,10 @@ def get_buffered_event_count(self, partition_id: str) -> Optional[int]:
def total_buffered_event_count(self) -> Optional[int]:
"""
The total number of events that are currently buffered and waiting to be published,
across all partitions. Returns None in non-buffered mode. **NOTE: This method should
only be used for debugging purposes. If an invalid `partition_id` is passed in,
then a value of 0 will be returned which may be misleading.**
across all partitions. Returns None in non-buffered mode. **NOTE: The event buffer
is processed in a background thread, therefore the number of events in the buffer
reported by this API should be considered only an approximation and is only recommend
for use in debugging.**
:rtype: int or None
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -827,10 +827,11 @@ async def close(self, *, flush: bool = True, **kwargs: Any) -> None:
def get_buffered_event_count(self, partition_id: str) -> Optional[int]:
"""
The number of events that are buffered and waiting to be published for a given partition.
Returns None in non-buffered mode. **NOTE: This method should only be used for debugging
purposes. If an invalid `partition_id` is passed in, then a value of 0 will be returned
which may be misleading.**
Returns None in non-buffered mode. **NOTE: The event buffer is processed in a background
coroutine, therefore the number of events in the buffer reported by this API should be
considered only an approximation and is only recommend for use in debugging. For a
partition ID that has no events buffered, 0 will be returned regardless of whether that
partition ID actually exists within the Event Hub.**
:param str partition_id: The target partition ID.
:rtype: int or None
Expand All @@ -849,10 +850,10 @@ def get_buffered_event_count(self, partition_id: str) -> Optional[int]:
def total_buffered_event_count(self) -> Optional[int]:
"""
The total number of events that are currently buffered and waiting to be published,
across all partitions. Returns None in non-buffered mode. **NOTE: This method should
only be used for debugging purposes. If an invalid `partition_id` is passed in,
then a value of 0 will be returned which may be misleading.**
across all partitions. Returns None in non-buffered mode. **NOTE: The event buffer
is processed in a background coroutine, therefore the number of events in the buffer
reported by this API should be considered only an approximation and is only recommend
for use in debugging.**
:rtype: int or None
"""
Expand Down