fix: prioritize recently added anime for relation sync
This commit is contained in:
@@ -95,6 +95,7 @@ JOIN anime a ON w.anime_id = a.id
|
|||||||
WHERE w.status IN ('completed', 'watching')
|
WHERE w.status IN ('completed', 'watching')
|
||||||
AND (a.relations_synced_at IS NULL OR a.relations_synced_at < datetime('now', '-7 days'))
|
AND (a.relations_synced_at IS NULL OR a.relations_synced_at < datetime('now', '-7 days'))
|
||||||
GROUP BY a.id
|
GROUP BY a.id
|
||||||
|
ORDER BY MAX(w.updated_at) DESC
|
||||||
LIMIT 50;
|
LIMIT 50;
|
||||||
|
|
||||||
-- name: GetUpcomingSeasons :many
|
-- name: GetUpcomingSeasons :many
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ JOIN anime a ON w.anime_id = a.id
|
|||||||
WHERE w.status IN ('completed', 'watching')
|
WHERE w.status IN ('completed', 'watching')
|
||||||
AND (a.relations_synced_at IS NULL OR a.relations_synced_at < datetime('now', '-7 days'))
|
AND (a.relations_synced_at IS NULL OR a.relations_synced_at < datetime('now', '-7 days'))
|
||||||
GROUP BY a.id
|
GROUP BY a.id
|
||||||
|
ORDER BY MAX(w.updated_at) DESC
|
||||||
LIMIT 50
|
LIMIT 50
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user