diff options
-rw-r--r-- | guix-data-service/web/controller.scm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/guix-data-service/web/controller.scm b/guix-data-service/web/controller.scm index b6ecfa7..a29382a 100644 --- a/guix-data-service/web/controller.scm +++ b/guix-data-service/web/controller.scm @@ -525,7 +525,7 @@ (define (startup-controller-thunk) (or - (base-controller request method-and-path-components) + (base-controller request method-and-path-components #f) (render-html #:sxml (server-starting-up-page) #:code 503))) @@ -542,7 +542,8 @@ #f)) #:code 500)))) -(define (base-controller request method-and-path-components) +(define* (base-controller request method-and-path-components + startup-completed?) (match method-and-path-components (('GET "assets" rest ...) (or (handle-static-assets (string-join rest "/") @@ -566,7 +567,9 @@ #:code (if (eq? database-status #t) 200 - 500)))) + (if startup-completed? + 500 + 503))))) (('GET "README") (let ((filename (string-append (%config 'doc-dir) "/README.html"))) (if (file-exists? filename) @@ -612,7 +615,7 @@ #:code 404))) (or - (base-controller request method-and-path-components) + (base-controller request method-and-path-components #t) (match method-and-path-components (('GET) (render-html |