Skip to content

Commit

Permalink
Only show followee in logs that are under a burst of followers (less …
Browse files Browse the repository at this point in the history
…than 6 tokens)
  • Loading branch information
dcadenas committed Jan 27, 2025
1 parent 0a9012f commit 12c8376
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/domain/followee_notification_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,17 @@ impl FolloweeNotificationFactory {
self.rate_limiter.consume(tokens_needed);

if let Some(follow_change) = followers.first() {
info!(
"Followee {}({}). {}",
follow_change.friendly_followee(),
follow_change
.followee()
.to_bech32()
.expect("Followee to_bech32"),
self.rate_limiter
);
if self.rate_limiter.get_available_tokens() < 6.0 {
info!(
"Followee {}({}). {}",
follow_change.friendly_followee(),
follow_change
.followee()
.to_bech32()
.expect("Followee to_bech32"),
self.rate_limiter
);
}
}
return messages;
}
Expand Down

0 comments on commit 12c8376

Please sign in to comment.