Skip to content

Commit 45dda96

Browse files
ventopretoioquatix
authored andcommitted
update inline processor example to use current API
Signed-off-by: ventopreto <llimadosanjos@gmail.com>
1 parent 4ec262f commit 45dda96

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

guides/getting-started/readme.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ sequenceDiagram
4444
You 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'
4748
require 'async/job'
4849
require 'async/job/processor/inline'
4950

@@ -54,13 +55,13 @@ end
5455

5556
# Create a simple inline pipeline:
5657
pipeline = 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
5960
end
6061

6162
# Enqueue a job:
6263
Async do
63-
pipeline.client.call("My job")
64+
pipeline.call("My job")
6465
# Prints "Processing job: My job"
6566
end
6667
```

0 commit comments

Comments
 (0)