|
|
@ -721,7 +721,11 @@ pub async fn emergency_request_timeout_job(pool: DbPool) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if let Ok(conn) = pool.get().await { |
|
|
let Ok(conn) = pool.get().await else { |
|
|
|
|
|
error!("Failed to get DB connection while searching emergency request timed out"); |
|
|
|
|
|
return; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
let emergency_access_list = EmergencyAccess::find_all_recoveries_initiated(&conn).await; |
|
|
let emergency_access_list = EmergencyAccess::find_all_recoveries_initiated(&conn).await; |
|
|
|
|
|
|
|
|
if emergency_access_list.is_empty() { |
|
|
if emergency_access_list.is_empty() { |
|
|
@ -765,9 +769,6 @@ pub async fn emergency_request_timeout_job(pool: DbPool) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
|
|
|
error!("Failed to get DB connection while searching emergency request timed out") |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
pub async fn emergency_notification_reminder_job(pool: DbPool) { |
|
|
pub async fn emergency_notification_reminder_job(pool: DbPool) { |
|
|
@ -776,7 +777,11 @@ pub async fn emergency_notification_reminder_job(pool: DbPool) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if let Ok(conn) = pool.get().await { |
|
|
let Ok(conn) = pool.get().await else { |
|
|
|
|
|
error!("Failed to get DB connection while searching emergency request timed out"); |
|
|
|
|
|
return; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
let emergency_access_list = EmergencyAccess::find_all_recoveries_initiated(&conn).await; |
|
|
let emergency_access_list = EmergencyAccess::find_all_recoveries_initiated(&conn).await; |
|
|
|
|
|
|
|
|
if emergency_access_list.is_empty() { |
|
|
if emergency_access_list.is_empty() { |
|
|
@ -824,7 +829,4 @@ pub async fn emergency_notification_reminder_job(pool: DbPool) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
|
|
|
error!("Failed to get DB connection while searching emergency notification reminder") |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|