From bb5f253b955d8c332eba493477d8ea7c982dc382 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Fri, 1 Jun 2018 18:40:30 +0100 Subject: [PATCH] Add /ping endpoint --- src/site.rkt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/site.rkt b/src/site.rkt index 37f9609..d76b14c 100644 --- a/src/site.rkt +++ b/src/site.rkt @@ -95,6 +95,7 @@ [("json" "tag-search-completions") json-tag-search-completions] [("json" "formal-tags") json-formal-tags] [("pkgs-all.json") pkgs-all-json] + [("ping") ping-page] )) (define (on-continuation-expiry request) @@ -1469,6 +1470,11 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(define (ping-page request) + (response/full 200 #"Alive" (current-seconds) #"text/plain" '() '())) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; TODO: fold the collection of this information into the package ;; database itself. (define (update-external-package-information! package-name)