aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-07-31 10:42:44 +0200
committerMathieu Othacehe <othacehe@gnu.org>2020-07-31 10:42:44 +0200
commita24bed0b1f1c6852253b4b0b699ad8bfaf432f6c (patch)
tree9e64513f997f4eab01e3f4744ad425aaa5d25920
parent0955a11abd9e27c96a1375cca6a1c97869b5780a (diff)
downloadcuirass-a24bed0b1f1c6852253b4b0b699ad8bfaf432f6c.tar
cuirass-a24bed0b1f1c6852253b4b0b699ad8bfaf432f6c.tar.gz
web: Add monitoring fiber.
* bin/cuirass.in (main): Add monitoring fiber in web mode.
-rw-r--r--bin/cuirass.in21
1 files changed, 15 insertions, 6 deletions
diff --git a/bin/cuirass.in b/bin/cuirass.in
index 7a2d5ae..b2721de 100644
--- a/bin/cuirass.in
+++ b/bin/cuirass.in
@@ -143,12 +143,21 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(let ((exit-channel (make-channel)))
(if (option-ref opts 'web #f)
- (spawn-fiber
- (essential-task
- 'web exit-channel
- (lambda ()
- (run-cuirass-server #:host host #:port port)))
- #:parallel? #t)
+ (begin
+ (spawn-fiber
+ (essential-task
+ 'web exit-channel
+ (lambda ()
+ (run-cuirass-server #:host host #:port port)))
+ #:parallel? #t)
+
+ (spawn-fiber
+ (essential-task
+ 'monitor exit-channel
+ (lambda ()
+ (while #t
+ (log-monitoring-stats)
+ (sleep 600))))))
(begin
(clear-build-queue)