Skip to content

Commit 5e97818

Browse files
committed
Rename AfterCommitAsyncDispatcher to AfterCommitDispatcher
Basically same reason as ImmediateAsyncDispatcher -> ImmediateDispatcher
1 parent ff615f5 commit 5e97818

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

contrib/ruby_event_store-sidekiq_scheduler/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Declare the scheduler in your Ruby Event Store configuration. We recommend to us
1616

1717
```ruby
1818
event_store = RailsEventStore::Client.new(
19-
dispatcher: RailsEventStore::AfterCommitAsyncDispatcher.new(scheduler: RubyEventStore::SidekiqScheduler.new(serializer: RubyEventStore::Serializers::YAML),
20-
)
19+
dispatcher: RailsEventStore::AfterCommitDispatcher.new(scheduler: RubyEventStore::SidekiqScheduler.new(serializer: RubyEventStore::Serializers::YAML),
20+
)
2121
```
2222

2323
Read more about [using asynchronous handlers](https://railseventstore.org/docs/v2/subscribe/#async-handlers)

contrib/ruby_event_store-sidekiq_scheduler/spec/after_commit_dispatcher_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
require "rails_event_store"
55

66
module RubyEventStore
7-
::RSpec.describe RailsEventStore::AfterCommitAsyncDispatcher do
7+
::RSpec.describe RailsEventStore::AfterCommitDispatcher do
88
around(:each) do |example|
99
::ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
1010
m =
@@ -28,13 +28,13 @@ class DummyRecord < ::ActiveRecord::Base
2828

2929
it_behaves_like :scheduler, SidekiqScheduler.new(serializer: RubyEventStore::Serializers::YAML)
3030

31-
it_behaves_like :dispatcher, RailsEventStore::AfterCommitAsyncDispatcher.new(scheduler: SidekiqScheduler.new(serializer: RubyEventStore::Serializers::YAML))
31+
it_behaves_like :dispatcher, RailsEventStore::AfterCommitDispatcher.new(scheduler: SidekiqScheduler.new(serializer: RubyEventStore::Serializers::YAML))
3232

3333
let(:event) { TimeEnrichment.with(RubyEventStore::Event.new(event_id: "83c3187f-84f6-4da7-8206-73af5aca7cc8")) }
3434
let(:record) { RubyEventStore::Mappers::Default.new.event_to_record(event) }
3535
let(:serialized_record) { record.serialize(YAML).to_h.transform_keys(&:to_s) }
3636

37-
let(:dispatcher) { RailsEventStore::AfterCommitAsyncDispatcher.new(scheduler: SidekiqScheduler.new(serializer: RubyEventStore::Serializers::YAML)) }
37+
let(:dispatcher) { RailsEventStore::AfterCommitDispatcher.new(scheduler: SidekiqScheduler.new(serializer: RubyEventStore::Serializers::YAML)) }
3838

3939
before(:each) { TestAsyncHandler.reset }
4040

rails_event_store/lib/rails_event_store/after_commit_dispatcher.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
module RailsEventStore
4-
class AfterCommitAsyncDispatcher
4+
class AfterCommitDispatcher
55
def initialize(scheduler:)
66
@scheduler = scheduler
77
end

rails_event_store/lib/rails_event_store/all.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require "ruby_event_store"
44
require_relative "async_handler_helpers"
55
require_relative "link_by_metadata"
6-
require_relative "after_commit_async_dispatcher"
6+
require_relative "after_commit_dispatcher"
77
require_relative "active_job_scheduler"
88
require_relative 'active_job_id_only_scheduler'
99
require_relative "client"

rails_event_store/lib/rails_event_store/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def initialize(
99
repository: RubyEventStore::ActiveRecord::EventRepository.new(serializer: RubyEventStore::Serializers::YAML),
1010
subscriptions: RubyEventStore::Subscriptions.new,
1111
dispatcher: RubyEventStore::ComposedDispatcher.new(
12-
RailsEventStore::AfterCommitAsyncDispatcher.new(
12+
RailsEventStore::AfterCommitDispatcher.new(
1313
scheduler: ActiveJobScheduler.new(serializer: RubyEventStore::Serializers::YAML)
1414
),
1515
RubyEventStore::Dispatcher.new

rails_event_store/lib/rails_event_store/json_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def initialize(
2929
repository: RubyEventStore::ActiveRecord::EventRepository.new(serializer: RubyEventStore::NULL),
3030
subscriptions: RubyEventStore::Subscriptions.new,
3131
dispatcher: RubyEventStore::ComposedDispatcher.new(
32-
RailsEventStore::AfterCommitAsyncDispatcher.new(
32+
RailsEventStore::AfterCommitDispatcher.new(
3333
scheduler: ActiveJobScheduler.new(serializer: RubyEventStore::Serializers::YAML)
3434
),
3535
RubyEventStore::Dispatcher.new

rails_event_store/spec/after_commit_dispatcher_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
require "ruby_event_store/spec/dispatcher_lint"
33

44
module RailsEventStore
5-
::RSpec.describe AfterCommitAsyncDispatcher do
5+
::RSpec.describe AfterCommitDispatcher do
66
DummyError = Class.new(StandardError)
77

88
class DummyRecord < ActiveRecord::Base
99
self.table_name = "dummy_records"
1010
after_commit -> { raise DummyError }
1111
end
1212

13-
it_behaves_like :dispatcher, AfterCommitAsyncDispatcher.new(scheduler: ActiveJobScheduler.new(serializer: RubyEventStore::Serializers::YAML))
13+
it_behaves_like :dispatcher, AfterCommitDispatcher.new(scheduler: ActiveJobScheduler.new(serializer: RubyEventStore::Serializers::YAML))
1414

1515
let(:event) { TimeEnrichment.with(RubyEventStore::Event.new(event_id: "83c3187f-84f6-4da7-8206-73af5aca7cc8")) }
1616
let(:record) { RubyEventStore::Mappers::Default.new.event_to_record(event) }
1717
let(:serialized_record) { record.serialize(RubyEventStore::Serializers::YAML).to_h.transform_keys(&:to_s) }
1818

19-
let(:dispatcher) { AfterCommitAsyncDispatcher.new(scheduler: ActiveJobScheduler.new(serializer: RubyEventStore::Serializers::YAML)) }
19+
let(:dispatcher) { AfterCommitDispatcher.new(scheduler: ActiveJobScheduler.new(serializer: RubyEventStore::Serializers::YAML)) }
2020

2121
before(:each) { MyActiveJobAsyncHandler.reset }
2222

0 commit comments

Comments
 (0)