Skip to content

Commit

Permalink
Switch last remaining places over to new logging method (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Dec 28, 2024
1 parent bfa0d38 commit 0518cb2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion canister/src/jobs/check_for_new_nns_votes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async fn run_single(
true
}
error => {
ic_cdk::eprintln!("Error calling `get_neuron_info`: {error:?}");
log(format!("Error calling `get_neuron_info`: {error:?}"));
false
}
}
Expand Down
14 changes: 8 additions & 6 deletions canister/src/jobs/process_votes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async fn process_vote(vote: VoteToProcess) {
}
}
Err(error) => {
ic_cdk::eprintln!("Error calling `get_wtn_proposal_id`: {error:?}");
log(format!("Error calling `get_wtn_proposal_id`: {error:?}"));
Some(VoteToProcess::NnsVote(pair_id, nns_vote))
}
}
Expand Down Expand Up @@ -125,18 +125,20 @@ async fn process_vote(vote: VoteToProcess) {
s.record_wtn_vote_registered(pair_id, wtn_vote);
}
Ok(Some(CommandResponse::Error(error))) => {
ic_cdk::eprintln!(
log(format!(
"Governance canister returned an error: {error:?}. Args: {args:?}"
);
));
s.push_vote_to_process(VoteToProcess::PendingWtnVote(pair_id, wtn_vote));
}
Ok(None) => {
ic_cdk::eprintln!(
log(format!(
"Governance canister returned an empty response. Args: {args:?}"
);
));
}
Err(error) => {
ic_cdk::eprintln!("Error calling `manage_neuron`: {error:?}. Args: {args:?}");
log(format!(
"Error calling `manage_neuron`: {error:?}. Args: {args:?}"
));
s.push_vote_to_process(VoteToProcess::PendingWtnVote(pair_id, wtn_vote));
}
});
Expand Down

0 comments on commit 0518cb2

Please sign in to comment.