From 12d71ee098c3eb84a9a5dc2419bd37a3b9e55dd2 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Wed, 2 Nov 2016 21:54:04 +0100 Subject: cuirass: Run HTTP server. * src/cuirass.scm: Re-export (cuirass http) module. * bin/cuirass.in (main): Run HTTP server and move the 'process-specs' loop in another thread. --- bin/cuirass.in | 10 +++++++--- src/cuirass.scm | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/cuirass.in b/bin/cuirass.in index ced9c54..a5a11b6 100644 --- a/bin/cuirass.in +++ b/bin/cuirass.in @@ -85,6 +85,10 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@" new-specs))) (if one-shot? (process-specs db (db-get-specifications db)) - (while #t - (process-specs db (db-get-specifications db)) - (sleep interval)))))))))) + (begin + (call-with-new-thread + (λ () + (while #t + (process-specs db (db-get-specifications db)) + (sleep interval)))) + (run-cuirass-server db)))))))))) diff --git a/src/cuirass.scm b/src/cuirass.scm index 35bea44..8d729b8 100644 --- a/src/cuirass.scm +++ b/src/cuirass.scm @@ -30,4 +30,5 @@ (for-each (λ (m) (module-use! i (resolve-interface m))) ;; Public modules. '((cuirass base) - (cuirass database))))) + (cuirass database) + (cuirass http))))) -- cgit v1.2.3