Add config circuit-breaker for heroes calculations during sync.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-11-19 03:07:15 +00:00
parent e60e86e9ed
commit 120ab1d068
4 changed files with 45 additions and 12 deletions

View File

@@ -1262,7 +1262,10 @@ async fn calculate_counts(
let small_room = joined_member_count.saturating_add(invited_member_count) <= 5;
let heroes: OptionFuture<_> = small_room
let heroes: OptionFuture<_> = services
.config
.calculate_heroes
.and_is(small_room)
.then(|| calculate_heroes(services, room_id, sender_user))
.into();