diff options
author | Marius Bakke <mbakke@fastmail.com> | 2020-04-30 23:47:49 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2020-04-30 23:47:49 +0200 |
commit | 8bf8cd9b85c85be387565f6c8ca9f6c72196fb8e (patch) | |
tree | 6fa0f8ba32b83a996625bc188903ccebfb7e7c2c /guix/scripts/substitute.scm | |
parent | 5d9e2187929ed7e8d46ec3cb3174fd78c1846360 (diff) | |
parent | 229f4fa9522fb56b014ee9c0d8111e8fb6da764d (diff) | |
download | patches-8bf8cd9b85c85be387565f6c8ca9f6c72196fb8e.tar patches-8bf8cd9b85c85be387565f6c8ca9f6c72196fb8e.tar.gz |
Merge branch 'master' into core-updates
Conflicts:
gnu/local.mk
gnu/packages/backup.scm
gnu/packages/emacs-xyz.scm
gnu/packages/guile.scm
gnu/packages/lisp.scm
gnu/packages/openldap.scm
gnu/packages/package-management.scm
gnu/packages/web.scm
gnu/packages/xorg.scm
Diffstat (limited to 'guix/scripts/substitute.scm')
-rwxr-xr-x | guix/scripts/substitute.scm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index 95b47a7816..ba2b2d2d4e 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -494,7 +494,8 @@ MAX-LENGTH first elements." (loop (+ 1 len) tail (cons head result))))))) (define* (http-multiple-get base-uri proc seed requests - #:key port (verify-certificate? #t)) + #:key port (verify-certificate? #t) + (batch-size 1000)) "Send all of REQUESTS to the server at BASE-URI. Call PROC for each response, passing it the request object, the response, a port from which to read the response body, and the previous result, starting with SEED, à la @@ -504,7 +505,7 @@ initial connection on which HTTP requests are sent." (requests requests) (result seed)) (define batch - (at-most 1000 requests)) + (at-most batch-size requests)) ;; (format (current-error-port) "connecting (~a requests left)..." ;; (length requests)) @@ -536,9 +537,10 @@ initial connection on which HTTP requests are sent." (() (match (drop requests processed) (() + (close-port p) (reverse result)) (remainder - (connect port remainder result)))) + (connect p remainder result)))) ((head tail ...) (let* ((resp (read-response p)) (body (response-body-port resp)) |