mirror of
https://github.com/ViViDboarder/bitwarden_rs.git
synced 2024-11-22 21:26:38 +00:00
Retry updating revision - fixes #383
This commit is contained in:
parent
06522c9ac0
commit
bce656c787
@ -184,9 +184,11 @@ impl User {
|
|||||||
|
|
||||||
pub fn update_revision(&mut self, conn: &DbConn) -> EmptyResult {
|
pub fn update_revision(&mut self, conn: &DbConn) -> EmptyResult {
|
||||||
self.updated_at = Utc::now().naive_utc();
|
self.updated_at = Utc::now().naive_utc();
|
||||||
|
crate::util::retry( || {
|
||||||
diesel::update(users::table.filter(users::uuid.eq(&self.uuid)))
|
diesel::update(users::table.filter(users::uuid.eq(&self.uuid)))
|
||||||
.set(users::updated_at.eq(&self.updated_at))
|
.set(users::updated_at.eq(&self.updated_at))
|
||||||
.execute(&**conn)
|
.execute(&**conn)
|
||||||
|
}, 10)
|
||||||
.map_res("Error updating user revision")
|
.map_res("Error updating user revision")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user