Skip to content

Commit de9b6b9

Browse files
committed
chore: docs
1 parent 37aa16f commit de9b6b9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ In order to be able to schedule jobs for future execution following [Scheduled J
5050
#<Interactor::Context message="hello!", sidekiq_options={ queue: :low_priority }, sidekiq_schedule_options={ perform_in: 5 }>
5151
```
5252
53+
### Customising the SidekiqWorker Class
54+
55+
You can declare you own class to use for the `::Sidekiq::Worker`. This is useful when raising errors and categorising queues.
56+
57+
```ruby
58+
sidekiq_worker_class class MyWorkerClass < ::Interactor::SidekiqWorker::Worker; end
59+
```
60+
61+
The class must inherit from `::Interactor::SidekiqWorker::Worker`.
62+
5363
## Failure
5464
5565
If you pass invalid parameters to sidekiq, you will get an immediate return with the error message.
@@ -85,11 +95,11 @@ class AsyncAction
8595
def self.sidekiq_options
8696
{ queue: :low_priority }
8797
end
88-
98+
8999
def self.sidekiq_schedule_options
90100
{ perform_in: 5 }
91101
end
92-
102+
93103
def self.handle_sidekiq_exception(error)
94104
# Integrate with Application Monitoring and Error Tracking Software
95105
end

0 commit comments

Comments
 (0)