Skip to content

Commit c451529

Browse files
committed
Merge branch 'master' of github.com:SberMarket-Tech/sbmt-outbox
2 parents 014fa98 + c616b4e commit c451529

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ rails g outbox:install
4343

4444
### Outbox/inbox items creation
4545

46-
An ActiveRecord model can be generated for the outbox/ inbox item like this:
46+
An ActiveRecord model can be generated for the outbox/inbox item like this:
4747

4848
```shell
4949
rails g outbox:item MaybeNamespaced::SomeOutboxItem --kind outbox
@@ -132,7 +132,7 @@ Example of a Grafana dashboard that you can import [from a file](./examples/graf
132132

133133
### `Outboxfile`
134134

135-
First of all you shoudl create an `Outboxfile` at the root of your application with the following code:
135+
First of all you should create an `Outboxfile` at the root of your application with the following code:
136136

137137
```ruby
138138
# frozen_string_literal: true
@@ -168,8 +168,8 @@ Rails.application.config.outbox.tap do |config|
168168
pc.retryable_items_batch_size = 100
169169

170170
# poll tactic: default is optimal for most cases: rate limit + redis job-queue size threshold
171-
# poll tactic: aggressive is for high-intencity data: without rate limits + redis job-queue size threshold
172-
# poll tactic: low-priority is for low-intencity data: rate limits + redis job-queue size threshold + + redis job-queue lag threshold
171+
# poll tactic: aggressive is for high-intensity data: without rate limits + redis job-queue size threshold
172+
# poll tactic: low-priority is for low-intensity data: rate limits + redis job-queue size threshold + + redis job-queue lag threshold
173173
pc.tactic = "default"
174174
# number of batches that one thread will process per rate interval
175175
pc.rate_limit = 60
@@ -290,7 +290,7 @@ production:
290290
bucket_size: 256
291291
```
292292
__CAUTION__:
293-
- ⚠️ If this option is enabled and an error occurs while processing a message in a bucket,
293+
- ⚠️ If this option is enabled and an error occurs while processing a message in a bucket,
294294
subsequent messages in that bucket won't be processed until the current message is either skipped or successfully processed
295295
- ⚠️ Cannot use `retry_strategies` and the `strict_order` option at the same time
296296

app/interactors/sbmt/outbox/process_item.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def check_retry_strategy(item, retry_strategy)
9393
track_discarded(item)
9494
Failure(:discard_item)
9595
else
96-
track_failed("retry stratagy returned unknown failure: #{result.failure}")
96+
track_failed("retry strategy returned unknown failure: #{result.failure}")
9797
Failure(:retry_strategy_failure)
9898
end
9999
end

spec/interactors/sbmt/outbox/process_item_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
context "when retry process" do
171171
let!(:outbox_item) { create(:outbox_item, processed_at: Time.current) }
172172

173-
it "do not track process_latency" do
173+
it "doesn't track process_latency" do
174174
expect { result }.not_to measure_yabeda_histogram(Yabeda.outbox.process_latency)
175175
end
176176
end
@@ -288,7 +288,7 @@
288288
expect(dummy_middleware).to have_received(:call).with(outbox_item)
289289
end
290290

291-
it "increment errors count" do
291+
it "increments errors count" do
292292
expect { result }.to change { outbox_item.reload.errors_count }.from(0).to(1)
293293
end
294294

@@ -316,7 +316,7 @@
316316
create(:outbox_item, processed_at: 1.hour.ago)
317317
end
318318

319-
it "increment errors count" do
319+
it "increments errors count" do
320320
expect { result }.to change { outbox_item.reload.errors_count }.from(0).to(1)
321321
end
322322

spec/jobs/sbmt/outbox/base_delete_stale_items_job_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def item_classes
2525
.to change(OutboxItem, :count).by(-1)
2626
end
2727

28-
context "when item is too yang" do
28+
context "when item is too young" do
2929
let(:created_at) { 1.hour.ago }
3030

3131
it "doesn't delete item" do

spec/lib/sbmt/outbox/v2/poll_throttler/composite_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@
4545
allow(throttle_throttler).to receive(:call).and_return(Dry::Monads::Result::Success.new(Sbmt::Outbox::V2::Throttler::THROTTLE_STATUS))
4646
end
4747

48-
it "return skip if present" do
48+
it "returns skip if present" do
4949
expect(described_class.new(throttlers: [
5050
throttle_throttler, noop_throttler, skip_throttler, failure_throttler
5151
]).call(0, task, nil).value!).to eq(Sbmt::Outbox::V2::Throttler::SKIP_STATUS)
5252
end
5353

54-
it "return failure if present" do
54+
it "returns failure if present" do
5555
expect(described_class.new(throttlers: [
5656
throttle_throttler, noop_throttler, failure_throttler
5757
]).call(0, task, nil).failure).to eq("some err")
5858
end
5959

60-
it "return throttle if present" do
60+
it "returns throttle if present" do
6161
expect(described_class.new(throttlers: [
6262
throttle_throttler, noop_throttler
6363
]).call(0, task, nil).value!).to eq(Sbmt::Outbox::V2::Throttler::THROTTLE_STATUS)

0 commit comments

Comments
 (0)