File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ sequenceDiagram
4444You can use {ruby Async::Job::Builder} to create a pipeline that includes both the producer and consumer sides of a queue:
4545
4646``` ruby
47+ require ' async'
4748require ' async/job'
4849require ' async/job/processor/inline'
4950
5455
5556# Create a simple inline pipeline:
5657pipeline = Async ::Job ::Builder .build(executor) do
57- # We are going to use an inline queue which processes the job in the background using Async{}:
58- queue Async ::Job ::Queue ::Inline
58+ # We are going to use an inline processor which processes the job in the background using Async{}:
59+ enqueue Async ::Job ::Processor ::Inline
5960end
6061
6162# Enqueue a job:
6263Async do
63- pipeline.client. call(" My job" )
64+ pipeline.call(" My job" )
6465 # Prints "Processing job: My job"
6566end
6667```
You can’t perform that action at this time.
0 commit comments