From c4730af97cf60a6159ad73437b27426cd9bfada6 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 30 Mar 2020 19:32:17 +0200 Subject: scripts: Catch any errors in worker and restart. --- scripts/mumi.in | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/mumi.in b/scripts/mumi.in index 3460292..e0a4d1a 100644 --- a/scripts/mumi.in +++ b/scripts/mumi.in @@ -27,6 +27,7 @@ (system repl server) (ice-9 match) (ice-9 threads) + (ice-9 format) (mumi config) (mumi bugs) (mumi messages) @@ -56,10 +57,16 @@ (define update-state! (lambda _ - (mu-index) - (update-bug-database!) - (sleep %update-interval) - (update-state!))) + (catch #t + (lambda () + (mu-index) + (update-bug-database!) + (sleep %update-interval) + (update-state!)) + (lambda args + (format (current-error-port) "worker error: ~a~%" args) + (sleep %update-interval) + (update-state!))))) (define %options ;; Specifications of the command-line options -- cgit v1.2.3