[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
09/10: Update insert-new-latest-status-entries
From: |
Christopher Baines |
Subject: |
09/10: Update insert-new-latest-status-entries |
Date: |
Wed, 21 Oct 2020 15:50:33 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository data-service.
commit 5124f3be3eb9de0036221832eb506319c8a3d5c7
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Wed Oct 21 20:25:59 2020 +0100
Update insert-new-latest-status-entries
To use the status first for ordering, then the timestamp. This ensures
sensible behaviour regardless of what timestamps are present.
---
guix-data-service/model/build-status.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/guix-data-service/model/build-status.scm
b/guix-data-service/model/build-status.scm
index 5a079a2..ec833b5 100644
--- a/guix-data-service/model/build-status.scm
+++ b/guix-data-service/model/build-status.scm
@@ -120,11 +120,11 @@ WHERE build_id IN ("
WINDOW rows_for_build AS (
PARTITION BY build_id
ORDER BY
- timestamp DESC,
CASE WHEN status = 'scheduled' THEN -2
WHEN status = 'started' THEN -1
ELSE 0
- END DESC
+ END DESC,
+ timestamp DESC
RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
)"))
- branch master updated (971a474 -> 63fc191), Christopher Baines, 2020/10/21
- 02/10: Cleanup scheduled and started builds with "0" timestamps, Christopher Baines, 2020/10/21
- 01/10: Fix broken links to builds, Christopher Baines, 2020/10/21
- 03/10: Add a view build link on the build page, Christopher Baines, 2020/10/21
- 04/10: Regenerate the latest_build_status table, Christopher Baines, 2020/10/21
- 05/10: Use the status for ordering, as well as timestamp, Christopher Baines, 2020/10/21
- 07/10: Fix rendering of the /builds page, Christopher Baines, 2020/10/21
- 06/10: Limit the builds displayed on the /builds page, Christopher Baines, 2020/10/21
- 10/10: Sort the pending builds by timestamp, Christopher Baines, 2020/10/21
- 08/10: Increase the limit on pending builds to query, Christopher Baines, 2020/10/21
- 09/10: Update insert-new-latest-status-entries,
Christopher Baines <=