From 263be83c90c6de809d61aacf07e8e0d0f3202339 Mon Sep 17 00:00:00 2001 From: barak Date: Sat, 25 May 2024 13:38:38 -0400 Subject: [PATCH] Add Queue.map to the README (#120) --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 6cee3da..11f5fe1 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,9 @@ print(job.results) # run a job and return the result print(await queue.apply("test", a=2)) +# Run multiple jobs concurrently and collect the results into a list +print(await queue.map("test", [{"a": 3}, {"a": 4}])) + # schedule a job in 10 seconds await queue.enqueue("test", a=1, scheduled=time.time() + 10) ```