Skip to content

Commit 02934f5

Browse files
committed
Expose frozen_at in metrics rather than just if the chat is frozen or not
1 parent 911893c commit 02934f5

File tree

2 files changed

+4
-4
lines changed
  • backend/canisters

2 files changed

+4
-4
lines changed

backend/canisters/community/impl/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ impl RuntimeState {
323323
owners: self.data.members.owners().len() as u32,
324324
blocked: self.data.members.blocked().len() as u32,
325325
invited: self.data.invited_users.len() as u32,
326-
frozen: self.data.is_frozen(),
326+
frozen_at: self.data.frozen.as_ref().map(|f| f.timestamp),
327327
groups_being_imported: self.data.groups_being_imported.summaries(),
328328
instruction_counts: self.data.instruction_counts_log.iter().collect(),
329329
event_store_client_info: self.data.event_store_client.info(),
@@ -1052,7 +1052,7 @@ pub struct Metrics {
10521052
pub owners: u32,
10531053
pub blocked: u32,
10541054
pub invited: u32,
1055-
pub frozen: bool,
1055+
pub frozen_at: Option<TimestampMillis>,
10561056
pub groups_being_imported: Vec<GroupBeingImportedSummary>,
10571057
pub instruction_counts: Vec<InstructionCountEntry>,
10581058
pub event_store_client_info: EventStoreClientInfo,

backend/canisters/group/impl/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ impl RuntimeState {
419419
messages_in_last_day,
420420
events_in_last_hour,
421421
events_in_last_day,
422-
frozen: self.data.is_frozen(),
422+
frozen_at: self.data.frozen.as_ref().map(|f| f.timestamp),
423423
instruction_counts: self.data.instruction_counts_log.iter().collect(),
424424
community_being_imported_into: self
425425
.data
@@ -879,7 +879,7 @@ pub struct Metrics {
879879
pub messages_in_last_day: u64,
880880
pub events_in_last_hour: u64,
881881
pub events_in_last_day: u64,
882-
pub frozen: bool,
882+
pub frozen_at: Option<TimestampMillis>,
883883
pub instruction_counts: Vec<InstructionCountEntry>,
884884
pub community_being_imported_into: Option<CommunityId>,
885885
pub serialized_chat_state_bytes: u64,

0 commit comments

Comments
 (0)