Skip to content

Commit

Permalink
fixup! In KafkaConsumer class, implement throttling of telemetry data.
Browse files Browse the repository at this point in the history
  • Loading branch information
tribeiro committed Feb 14, 2025
1 parent b78b8b7 commit 735b8fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/lsst/ts/salobj/kafka_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,9 @@ def _handle_throttle(self) -> None:
self.log.info(
f"{kafka_name}: {index=} throutput={n_read/dt} messages/s ({throttle=})."
)
old_throttle = self.throttle_telemetry[kafka_name].get(index, 0)
old_throttle = self.throttle_telemetry[kafka_name].get(
index, throttle
)
self.throttle_telemetry[kafka_name][index] = int(
(old_throttle + throttle) / 2.0
)
Expand Down

0 comments on commit 735b8fe

Please sign in to comment.