Fix plugin listing for rar files, temporary backfil shim

`main` is just backfilling the eixsting bad rar files in the db. I will return script to normal once it's run.
This commit is contained in:
2021-07-26 01:16:43 -04:00
parent 87ca90be06
commit 5d62fb7d61
3 changed files with 285 additions and 267 deletions

View File

@@ -91,3 +91,14 @@ pub async fn update_has_download_link(
.await
.context("Failed to update file")
}
#[instrument(level = "debug", skip(pool))]
pub async fn get_files_that_need_backfill(pool: &sqlx::Pool<sqlx::Postgres>) -> Result<Vec<File>> {
sqlx::query_as!(
File,
"SELECT * FROM files WHERE created_at >= '2021-07-24 02:07:25' and file_name like '%.rar'",
)
.fetch_all(pool)
.await
.context("Failed to get files")
}