aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2024-12-29 14:46:31 +0100
committerPřemysl Eric Janouch <p@janouch.name>2024-12-29 14:47:11 +0100
commitb73e0b46225f447b08bb5b21cd7c1f199f9ff701 (patch)
tree9480d784f6fe62542167faba51526f2462a55613 /main.go
parent0530c5d95fde2b77fcae29a7cfa08bb75da4f5a5 (diff)
downloadgallery-b73e0b46225f447b08bb5b21cd7c1f199f9ff701.tar.gz
gallery-b73e0b46225f447b08bb5b21cd7c1f199f9ff701.tar.xz
gallery-b73e0b46225f447b08bb5b21cd7c1f199f9ff701.zip
Order orphans by path
It costs more cycles, but the SHA-1 they got implicitly ordered by is pseudo-random.
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.go b/main.go
index 3afe941..8a82916 100644
--- a/main.go
+++ b/main.go
@@ -687,7 +687,8 @@ func getOrphans() (result []webOrphan, err error) {
FROM orphan AS o
JOIN image AS i ON o.sha1 = i.sha1
LEFT JOIN tag_assignment AS ta ON o.sha1 = ta.sha1
- GROUP BY o.sha1`)
+ GROUP BY o.sha1
+ ORDER BY path`)
if err != nil {
return nil, err
}