diff options
author | Christopher Baines <mail@cbaines.net> | 2019-07-12 19:58:37 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-07-12 23:00:44 +0100 |
commit | 83ef624b978f196892d2a28fc59797a15cded131 (patch) | |
tree | 539e6b6b67edb6507be8ba9c77ddab531c27dbea /tests | |
parent | 09d927cb99d488b1d9024ec7592b900b6645d065 (diff) | |
download | data-service-83ef624b978f196892d2a28fc59797a15cded131.tar data-service-83ef624b978f196892d2a28fc59797a15cded131.tar.gz |
Switch to processing jobs in parallel
This should speed up processing new revisions, reduce latency between finding
out about new revisions and processing them, as well as help manage memory
usage, by processing each job in a process that then exits.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/jobs-load-new-guix-revision.scm | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/tests/jobs-load-new-guix-revision.scm b/tests/jobs-load-new-guix-revision.scm index 944feee..aee6225 100644 --- a/tests/jobs-load-new-guix-revision.scm +++ b/tests/jobs-load-new-guix-revision.scm @@ -32,13 +32,13 @@ (lambda (conn git-repository-id commit store-path) #t)) - (enqueue-load-new-guix-revision-job - conn - (git-repository-url->git-repository-id conn "test-url") - "test-commit" - "test-source") - - (process-next-load-new-guix-revision-job conn)))) + (match (enqueue-load-new-guix-revision-job + conn + (git-repository-url->git-repository-id conn "test-url") + "test-commit" + "test-source") + ((id) + (process-load-new-guix-revision-job id)))))) (test-equal "test build store item failure" #f @@ -48,13 +48,13 @@ (lambda (conn git-repository-id commit) #f)) - (enqueue-load-new-guix-revision-job - conn - (git-repository-url->git-repository-id conn "test-url") - "test-commit" - "test-source") - - (process-next-load-new-guix-revision-job conn))) + (match (enqueue-load-new-guix-revision-job + conn + (git-repository-url->git-repository-id conn "test-url") + "test-commit" + "test-source") + ((id) + (process-load-new-guix-revision-job id))))) (test-equal "test extract information failure" #f @@ -70,12 +70,12 @@ (lambda (conn git-repository-id commit store-path) #f)) - (enqueue-load-new-guix-revision-job - conn - (git-repository-url->git-repository-id conn "test-url") - "test-commit" - "test-source") - - (process-next-load-new-guix-revision-job conn)))))) + (match (enqueue-load-new-guix-revision-job + conn + (git-repository-url->git-repository-id conn "test-url") + "test-commit" + "test-source") + ((id) + (process-load-new-guix-revision-job id)))))))) (test-end) |