aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-03-17 12:49:46 +0000
committerChristopher Baines <mail@cbaines.net>2024-03-17 12:49:46 +0000
commitfae501e69cb4236bd2702a2b281ee66e17d2cb17 (patch)
treeb296b7681c46e1251363e35b3d6c73fbaa405180
parent9fd8aabc11e396c604d360eea44b5f38ca60813a (diff)
downloadqa-frontpage-fae501e69cb4236bd2702a2b281ee66e17d2cb17.tar
qa-frontpage-fae501e69cb4236bd2702a2b281ee66e17d2cb17.tar.gz
Add a buffer to prevent deleting some branches that aren't found
To reduce instances of branches getting repeatedly deleted then recreated.
-rw-r--r--guix-qa-frontpage/manage-patch-branches.scm14
1 files changed, 8 insertions, 6 deletions
diff --git a/guix-qa-frontpage/manage-patch-branches.scm b/guix-qa-frontpage/manage-patch-branches.scm
index a42f3a0..c11b33a 100644
--- a/guix-qa-frontpage/manage-patch-branches.scm
+++ b/guix-qa-frontpage/manage-patch-branches.scm
@@ -366,17 +366,19 @@
#f)))
#f))
+ (define series-count-buffer 40)
+
(define (perform-pass)
(let ((issue-numbers
(map string->number
(issue-numbers-for-branches)))
(all-patchwork-series
- (with-sqlite-cache
- database
- 'latest-patchwork-series-by-issue
- latest-patchwork-series-by-issue
- #:args `(#:count ,series-count)
- #:ttl 120))
+ (with-sqlite-cache
+ database
+ 'latest-patchwork-series-by-issue
+ latest-patchwork-series-by-issue
+ #:args `(#:count ,(+ series-count series-count-buffer))
+ #:ttl 120))
(latest-master-revision
(get-latest-processed-branch-revision "master")))