Skip to content

Commit aea6bcd

Browse files
committed
fix(backend:files-scheduler): correct ordering of recent files
1 parent c1bc014 commit aea6bcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/src/applications/files/services/files-scheduler.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export class FilesScheduler {
124124
WHERE ${fk} IS NOT NULL
125125
AND id NOT IN (SELECT id
126126
FROM (SELECT id,
127-
ROW_NUMBER() OVER (PARTITION BY ${fk} ORDER BY ${filesRecents.mtime}) AS rn
127+
ROW_NUMBER() OVER (PARTITION BY ${fk} ORDER BY ${filesRecents.mtime} DESC) AS rn
128128
FROM ${filesRecents}
129129
WHERE ${fk} IS NOT NULL) AS ranked
130130
WHERE ranked.rn <= ${keepNumber})

0 commit comments

Comments
 (0)