Updates for the "full flow"
This commit is contained in:
@@ -68,6 +68,16 @@ pub async fn list(
|
||||
.await?)
|
||||
}
|
||||
|
||||
pub async fn find_by_wanted_item_id(
|
||||
db: &DatabaseConnection,
|
||||
wanted_item_id: i32,
|
||||
) -> DbResult<Option<DownloadQueueItem>> {
|
||||
Ok(DownloadQueue::find()
|
||||
.filter(download_queue::Column::WantedItemId.eq(wanted_item_id))
|
||||
.one(db)
|
||||
.await?)
|
||||
}
|
||||
|
||||
pub async fn retry_failed(db: &DatabaseConnection, id: i32) -> DbResult<()> {
|
||||
let item = DownloadQueue::find_by_id(id)
|
||||
.one(db)
|
||||
|
||||
Reference in New Issue
Block a user