diff options
author | Christopher Baines <mail@cbaines.net> | 2024-04-15 14:51:47 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-04-15 16:15:05 +0100 |
commit | c58aa2711a0f9ef84ace1e9dc003c5ce243adb9e (patch) | |
tree | 3e84d572a64d59958417fdc1b682640c0f4d1779 | |
parent | 222b3400c3aa3be7c129459ea7ac70d7fff619d8 (diff) | |
download | nar-herder-c58aa2711a0f9ef84ace1e9dc003c5ce243adb9e.tar nar-herder-c58aa2711a0f9ef84ace1e9dc003c5ce243adb9e.tar.gz |
Make the server parallelism configurable
And drop the default to 1.
-rw-r--r-- | nar-herder/server.scm | 2 | ||||
-rw-r--r-- | scripts/nar-herder.in | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/nar-herder/server.scm b/nar-herder/server.scm index 4b5f710..dd59216 100644 --- a/nar-herder/server.scm +++ b/nar-herder/server.scm @@ -901,5 +901,5 @@ (wait finished?)) #:hz 0 - #:parallelism 4)) + #:parallelism (assq-ref opts 'parallelism))) finished?)))) diff --git a/scripts/nar-herder.in b/scripts/nar-herder.in index e70f5f3..459526e 100644 --- a/scripts/nar-herder.in +++ b/scripts/nar-herder.in @@ -306,7 +306,13 @@ (lambda (opt name arg result) (alist-cons 'mirror arg - (alist-delete 'mirror result)))))) + (alist-delete 'mirror result)))) + + (option '("parallelism") #t #f + (lambda (opt name arg result) + (alist-cons 'parallelism + (string->number arg) + (alist-delete 'parallelism result)))))) (define %server-option-defaults '((port . 8080) @@ -317,7 +323,9 @@ (cached-compression-workers . 2) (cached-compression-min-uses . 3) - (recent-changes-limit . 32768))) + (recent-changes-limit . 32768) + + (parallelism . 1))) (define %check-options (list)) |