bug fixed
This commit is contained in:
parent
4c785f2542
commit
f9f245f2a2
|
@ -90,19 +90,31 @@ impl Synchronizer {
|
|||
}),
|
||||
};
|
||||
|
||||
let ss_get_member_by_username_res_msg = self
|
||||
let ss_get_member_by_username_res_msg = match self
|
||||
.connection_broker
|
||||
.request(
|
||||
bpr::ss::member::SUBJECT_GET_MEMBER_BY_USERNAME,
|
||||
ss_get_member_by_username_req.encode_to_vec(),
|
||||
)
|
||||
.await
|
||||
.expect("SUBJECT_GET_MEMBER_BY_USERNAME");
|
||||
{
|
||||
Ok(r) => r,
|
||||
Err(e) => {
|
||||
println!("bpr::ss::member::SUBJECT_GET_MEMBER_BY_USERNAME: {}", e);
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
||||
let ss_get_member_by_username_res = bpr::ss::member::GetMemberByUsernameResponse::decode(
|
||||
let ss_get_member_by_username_res =
|
||||
match bpr::ss::member::GetMemberByUsernameResponse::decode(
|
||||
ss_get_member_by_username_res_msg.data.as_slice(),
|
||||
)
|
||||
.expect("GetMemberByUsernameResponse");
|
||||
) {
|
||||
Ok(r) => r,
|
||||
Err(e) => {
|
||||
println!("bpr::ss::member::GetMemberByUsernameResponse: {}", e);
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
||||
if let Some(e) = ss_get_member_by_username_res.error {
|
||||
println!(
|
||||
|
@ -117,16 +129,19 @@ impl Synchronizer {
|
|||
Some(m) => {
|
||||
let member_id = uuid::Uuid::from_str(m.id.as_str()).expect("uuid::Uuid");
|
||||
|
||||
self
|
||||
.member_repository
|
||||
.insert(
|
||||
match self.member_repository.insert(
|
||||
&conn,
|
||||
&repositories::member::models::NewMember {
|
||||
id: u.id,
|
||||
member_id,
|
||||
},
|
||||
)
|
||||
.expect("member insert");
|
||||
) {
|
||||
Ok(r) => r,
|
||||
Err(e) => {
|
||||
println!("member_repository.insert: {}", e);
|
||||
continue;
|
||||
}
|
||||
};
|
||||
}
|
||||
None => {
|
||||
println!("member is not exist: {}", u.site_username);
|
||||
|
|
Loading…
Reference in New Issue
Block a user