diff options
-rw-r--r-- | guix-build-coordinator/agent.scm | 70 |
1 files changed, 33 insertions, 37 deletions
diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm index d5c20ac..68f9b86 100644 --- a/guix-build-coordinator/agent.scm +++ b/guix-build-coordinator/agent.scm @@ -759,43 +759,39 @@ but the guix-daemon claims it's unavailable" " missing paths") (retry-on-error (lambda () - (with-timeout (* 60 11) ; 11 minutes - (raise-exception - (make-exception-with-message "timeout fetching inputs")) - (begin - (with-store fetch-substitute-store - ;; Download the substitutes - (apply set-build-options - fetch-substitute-store - `(,@(if non-derivation-substitute-urls - (list #:substitute-urls - non-derivation-substitute-urls) - '()) - #:max-silent-time 120 - #:timeout ,(* 60 60))) - - (let ((log-port (open-output-string))) - (with-throw-handler #t - (lambda () - (with-port-timeouts - (lambda () - (set-store-connection-timeout - fetch-substitute-store) - (parameterize - ((current-build-output-port log-port)) - (build-things fetch-substitute-store - missing-paths))) - #:timeout (* 60 10 1000))) - (lambda (key . args) - (log-msg lgr 'ERROR - "exception when fetching missing paths " - key ": " args) - (display (get-output-string log-port)) - (display (newline)) - (close-output-port log-port))))) - (for-each (lambda (missing-path) - (add-temp-root store missing-path)) - missing-paths)))) + (with-store fetch-substitute-store + ;; Download the substitutes + (apply set-build-options + fetch-substitute-store + `(,@(if non-derivation-substitute-urls + (list #:substitute-urls + non-derivation-substitute-urls) + '()) + #:max-silent-time 120 + #:timeout ,(* 60 60))) + + (let ((log-port (open-output-string))) + (with-throw-handler #t + (lambda () + (with-port-timeouts + (lambda () + (set-store-connection-timeout + fetch-substitute-store) + (parameterize + ((current-build-output-port log-port)) + (build-things fetch-substitute-store + missing-paths))) + #:timeout (* 60 10 1000))) + (lambda (key . args) + (log-msg lgr 'ERROR + "exception when fetching missing paths " + key ": " args) + (display (get-output-string log-port)) + (display (newline)) + (close-output-port log-port))))) + (for-each (lambda (missing-path) + (add-temp-root store missing-path)) + missing-paths)) #:times 12 #:delay (random 15)) |