Fix DB mutex deadlock

This commit is contained in:
Gregory Schier
2024-02-04 21:17:05 -08:00
parent 5ed1ea07ef
commit 1f71d4372f
9 changed files with 312 additions and 348 deletions

View File

@@ -366,7 +366,7 @@ pub async fn send_http_request(
.await
.expect("Failed to update response");
if !request.id.is_empty() {
emit_side_effect(app_handle.clone(), "updated_model", &response);
emit_side_effect(app_handle.clone(), "upserted_model", &response);
}
// Copy response to download path, if specified
@@ -399,7 +399,7 @@ pub async fn send_http_request(
cookie_jar.cookies = json_cookies;
match models::upsert_cookie_jar(db, &cookie_jar).await {
Ok(updated_jar) => {
emit_side_effect(app_handle, "updated_model", &updated_jar);
emit_side_effect(app_handle, "upserted_model", &updated_jar);
}
Err(e) => {
error!("Failed to update cookie jar: {}", e);