Skip to content

Commit 935e4d0

Browse files
lukaszreszkemostlyobvious
authored andcommitted
Rename AfterCommitAsyncDispatcher to AfterCommitDispatcher
Basically same reason as ImmediateAsyncDispatcher -> ImmediateDispatcher
1 parent 756e021 commit 935e4d0

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
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)

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
@@ -30,7 +30,7 @@ def initialize(
3030
repository: RubyEventStore::ActiveRecord::EventRepository.new(serializer: RubyEventStore::NULL),
3131
subscriptions: RubyEventStore::Subscriptions.new,
3232
dispatcher: RubyEventStore::ComposedDispatcher.new(
33-
RailsEventStore::AfterCommitAsyncDispatcher.new(
33+
RailsEventStore::AfterCommitDispatcher.new(
3434
scheduler: ActiveJobScheduler.new(serializer: RubyEventStore::Serializers::YAML)
3535
),
3636
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)