Skip to content

Commit

Permalink
Log error if end video call job fails
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles committed Dec 16, 2024
1 parent d992e1c commit 7031f0c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion backend/canisters/community/impl/src/timer_job_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@ impl Job for MarkP2PSwapExpiredJob {

impl Job for MarkVideoCallEndedJob {
fn execute(self) {
mutate_state(|state| end_video_call_impl(self.0, state));
let response = mutate_state(|state| end_video_call_impl(self.0.clone(), state));
if !matches!(response, community_canister::end_video_call::Response::Success) {
error!(?response, args = ?self.0, "Failed to mark video call ended");
}
}
}
5 changes: 4 additions & 1 deletion backend/canisters/group/impl/src/timer_job_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ impl Job for MarkP2PSwapExpiredJob {

impl Job for MarkVideoCallEndedJob {
fn execute(self) {
mutate_state(|state| end_video_call_impl(self.0, state));
let response = mutate_state(|state| end_video_call_impl(self.0.clone(), state));
if !matches!(response, group_canister::end_video_call::Response::Success) {
error!(?response, args = ?self.0, "Failed to mark video call ended");
}
}
}
5 changes: 4 additions & 1 deletion backend/canisters/user/impl/src/timer_job_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ impl Job for SendMessageToChannelJob {

impl Job for MarkVideoCallEndedJob {
fn execute(self) {
mutate_state(|state| end_video_call_impl(self.0, state));
let response = mutate_state(|state| end_video_call_impl(self.0.clone(), state));
if !matches!(response, user_canister::end_video_call::Response::Success) {
error!(?response, args = ?self.0, "Failed to mark video call ended");
}
}
}

0 comments on commit 7031f0c

Please sign in to comment.