Remove duplicates before creating deletion queue
This commit is contained in:
parent
255aca68de
commit
94bd5bdbb5
1 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@ pub async fn find_orphaned_files(
|
|||
) -> Result<Vec<String>, DatabaseError> {
|
||||
let rows = db_client.query(
|
||||
"
|
||||
SELECT fname
|
||||
SELECT DISTINCT fname
|
||||
FROM unnest($1::text[]) AS fname
|
||||
WHERE
|
||||
NOT EXISTS (
|
||||
|
@ -61,7 +61,7 @@ pub async fn find_orphaned_ipfs_objects(
|
|||
) -> Result<Vec<String>, DatabaseError> {
|
||||
let rows = db_client.query(
|
||||
"
|
||||
SELECT cid
|
||||
SELECT DISTINCT cid
|
||||
FROM unnest($1::text[]) AS cid
|
||||
WHERE
|
||||
NOT EXISTS (
|
||||
|
|
Loading…
Reference in a new issue