Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bedrock-adam authored Jan 21, 2024
1 parent 1c7c162 commit f4be4f9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,23 @@ class Event < ActiveRecord::Base
end
```

#### 4. update the generated sidekiq publisher block to queue a job based on the class
#### 4. generate the sidekiq publisher

```bash
bin/rails g outboxer:publisher:sidekiq
```

#### 5. update the publish block to queue a sidekiq job based on the class of the created model

```ruby
Outboxer::Message.publish! do |outboxer_message|
Outboxer::Publisher.publish! do |outboxer_message|
case outboxer_message.outboxer_messageable_id
when 'Event'
EventCreatedJob.perform_async({ 'id' => outboxer_message.outboxer_messageable_id })
end
end
```

#### 5. generate the sidekiq publisher

```bash
bin/rails g outboxer:publisher:sidekiq
```

#### 6. run the publisher

```bash
Expand Down

0 comments on commit f4be4f9

Please sign in to comment.