aboutsummaryrefslogtreecommitdiff
path: root/guix-qa-frontpage/server.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix-qa-frontpage/server.scm')
-rw-r--r--guix-qa-frontpage/server.scm19
1 files changed, 12 insertions, 7 deletions
diff --git a/guix-qa-frontpage/server.scm b/guix-qa-frontpage/server.scm
index 44a09ae..32c812c 100644
--- a/guix-qa-frontpage/server.scm
+++ b/guix-qa-frontpage/server.scm
@@ -53,7 +53,8 @@
start-refresh-patch-branches-data-thread
start-refresh-non-patch-branches-data-thread))
-(define (make-controller assets-directory database metrics-registry)
+(define* (make-controller assets-directory database metrics-registry
+ #:key (patch-issues-to-show 200))
(define handle-static-assets
(if (string-prefix? (%store-prefix)
@@ -172,8 +173,8 @@
(render-html
#:sxml
(patches-view (if (> (length sorted-latest-series)
- 200)
- (take sorted-latest-series 200)
+ patch-issues-to-show)
+ (take sorted-latest-series patch-issues-to-show)
sorted-latest-series)))))
(('GET "issue" (? (lambda (s) (string-suffix? ".svg" s)) number.svg))
(let* ((number
@@ -418,9 +419,11 @@ has no patches or has been closed.")
#:code 500))))
(define* (start-guix-qa-frontpage-web-server port host assets-directory
- database metrics-registry)
+ database metrics-registry
+ #:key (controller-args '()))
(define controller
- (make-controller assets-directory database metrics-registry))
+ (apply make-controller assets-directory database metrics-registry
+ controller-args))
(call-with-error-handling
(lambda ()
@@ -442,8 +445,10 @@ Check if it's already running, or whether another process is using that
port. Also, the port used can be changed by passing the --port option.\n"
port)))))))
-(define (start-refresh-patch-branches-data-thread database)
- (define number-of-series-to-refresh 250)
+(define* (start-refresh-patch-branches-data-thread
+ database
+ #:key
+ (number-of-series-to-refresh 250))
(define (refresh-data)
(simple-format (current-error-port)