Skip to content

Commit

Permalink
Add Queue.map to the README (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
barakalon authored May 25, 2024
1 parent 13a24d3 commit 263be83
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```
Expand Down

0 comments on commit 263be83

Please sign in to comment.