[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Mathieu Othacehe |
Date: |
Wed, 1 Dec 2021 06:39:12 -0500 (EST) |
branch: wip-logs
commit bef9d8b4227170c1c08fdcf987dcd821fd5a9015
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Mon Nov 29 13:59:31 2021 +0100
wip: add remote-worker logs.
---
src/cuirass/scripts/remote-worker.scm | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/src/cuirass/scripts/remote-worker.scm
b/src/cuirass/scripts/remote-worker.scm
index d25ad4f..812ae4e 100644
--- a/src/cuirass/scripts/remote-worker.scm
+++ b/src/cuirass/scripts/remote-worker.scm
@@ -18,6 +18,7 @@
(define-module (cuirass scripts remote-worker)
#:use-module (cuirass base)
+ #:use-module (cuirass logging)
#:use-module (cuirass remote)
#:use-module (cuirass ui)
#:use-module (gcrypt pk-crypto)
@@ -204,7 +205,8 @@ still be substituted."
#:max-silent max-silent)
(reply (zmq-build-started-message drv name))
(guard (c ((store-protocol-error? c)
- (info (G_ "Derivation `~a' build failed: ~a~%")
+ (log-message (G_ "~a: derivation `~a' build failed: ~a")
+ name
drv (store-protocol-error-message c))
(reply (zmq-build-failed-message drv local-publish-url))))
(let ((result
@@ -215,11 +217,13 @@ still be substituted."
(finish))))
(if result
(begin
- (info (G_ "Derivation ~a build succeeded.~%") drv)
+ (log-message (G_ "~a: derivation ~a build succeeded.")
+ name drv)
(register-gc-roots drv)
(reply (zmq-build-succeeded-message drv local-publish-url)))
(begin
- (info (G_ "Derivation ~a build failed.~%") drv)
+ (log-message (G_ "~a: derivation ~a build failed.")
+ name drv)
(reply
(zmq-build-failed-message drv local-publish-url)))))))))
@@ -235,15 +239,16 @@ command. REPLY is a procedure that can be used to reply
to this server."
('max-silent max-silent)
('timestamp timestamp)
('system system))
- (info (G_ "Building `~a' derivation.~%") drv)
+ (log-message (G_ "~a: building `~a' derivation.")
+ (worker-name worker) drv)
(run-build drv server
#:reply reply
#:worker worker
#:timeout timeout
#:max-silent max-silent))
(('no-build)
- (info (G_ "~a: No available build.~%"
- (worker-name worker)))
+ (log-message (G_ "~a: no available build.")
+ (worker-name worker))
#t)))
(define (worker-ping worker server)
@@ -262,7 +267,7 @@ command. REPLY is a procedure that can be used to reply to
this server."
(endpoint (zmq-backend-endpoint address port)))
(zmq-connect socket endpoint)
(let loop ()
- (info (G_ "~a: ping ~a.~%") (worker-name worker) endpoint)
+ (log-message (G_ "~a: ping ~a.") (worker-name worker) endpoint)
(ping socket)
(sleep 60)
(loop))))))
@@ -341,7 +346,7 @@ and executing them. The worker can reply on the same
socket."
(ready socket worker)
(worker-ping worker server)
(let loop ()
- (info (G_ "~a: request work.~%") (worker-name wrk))
+ (log-message (G_ "~a: request work.") (worker-name wrk))
(request-work socket worker)
(match (zmq-get-msg-parts-bytevector socket '())
((empty command)