Skip to content

Commit

Permalink
comment -> docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
shellmayr committed Nov 5, 2024
1 parent 677469f commit 08c7d99
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ def get_boost_low_volume_projects_sample_rate(
def get_boost_low_volume_projects_sample_rate(
org_id: int, project_id: int, *, error_sample_rate_fallback: float | None
) -> tuple[float | None, bool]:
# Returned tuple contains
# - the sample rate as a float
# - a boolean specifying whether a sample rate or fallback was used for the sample rate (False -> fallback was used)
"""Get the sample rate and whether it was directly retrieved or is a fallback.
Returns:
A tuple containing:
- float: The sample rate value
- bool: Whether the sample rate was directly retrieved (True) or is a fallback (False)
"""
redis_client = get_redis_client_for_ds()
cache_key = generate_boost_low_volume_projects_cache_key(org_id=org_id)

Expand Down

0 comments on commit 08c7d99

Please sign in to comment.