aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-06-17 16:58:31 +0100
committerChristopher Baines <mail@cbaines.net>2019-06-17 18:09:10 +0100
commit3df0b43146e20b8d86da5f890ca5cc163e929805 (patch)
tree324a682f73777f9002c2e2d7d0cec9a2d709ac93 /scripts
parent7f0a0ed3b13c4a650ffb7c4cb6693b1b23d0f628 (diff)
downloaddata-service-3df0b43146e20b8d86da5f890ca5cc163e929805.tar
data-service-3df0b43146e20b8d86da5f890ca5cc163e929805.tar.gz
Use line buffering for the input and output ports
As these are used for logging, which is done on a line by line basis. Remove the now redundant calls to (force-output).
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix-data-service-process-jobs.in3
-rw-r--r--scripts/guix-data-service.in3
2 files changed, 6 insertions, 0 deletions
diff --git a/scripts/guix-data-service-process-jobs.in b/scripts/guix-data-service-process-jobs.in
index f0338a7..e4347e4 100644
--- a/scripts/guix-data-service-process-jobs.in
+++ b/scripts/guix-data-service-process-jobs.in
@@ -27,6 +27,9 @@
(guix-data-service database)
(guix-data-service jobs))
+(setvbuf (current-output-port) 'line)
+(setvbuf (current-error-port) 'line)
+
(with-postgresql-connection
(lambda (conn)
(simple-format #t "Ready to process jobs...\n")
diff --git a/scripts/guix-data-service.in b/scripts/guix-data-service.in
index 1c57c57..a0d64cf 100644
--- a/scripts/guix-data-service.in
+++ b/scripts/guix-data-service.in
@@ -80,6 +80,9 @@
(error "extraneous argument" arg))
%default-options))
+(setvbuf (current-output-port) 'line)
+(setvbuf (current-error-port) 'line)
+
(let ((opts (parse-options (cdr (program-arguments)))))
(let ((repl-port (assoc-ref opts 'listen-repl)))
(when repl-port