diff --git a/.rubocop.yml b/.rubocop.yml index 2f4fab07..eacce22d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -128,7 +128,7 @@ RSpec/DescribedClass: RSpec/ExampleLength: Enabled: false -# enforces using either `expect` or `allow` for stubs. Since they do differnet things, +# enforces using either `expect` or `allow` for stubs. Since they do different things, # we should let the developer decide which to use RSpec/MessageExpectation: Enabled: false diff --git a/lib/delayed/backend/active_record.rb b/lib/delayed/backend/active_record.rb index 454ee26c..6c396dbf 100644 --- a/lib/delayed/backend/active_record.rb +++ b/lib/delayed/backend/active_record.rb @@ -119,7 +119,7 @@ def self.reserve_with_scope_using_default_sql(ready_scope, worker, now) # This is our old fashion, tried and true, but possibly slower lookup # Instead of reading the entire job record for our detect loop, we select only the id, # and only read the full job record after we've successfully locked the job. - # This can have a noticable impact on large read_ahead configurations and large payload jobs. + # This can have a noticeable impact on large read_ahead configurations and large payload jobs. ready_scope.limit(worker.read_ahead).select(:id).detect do |job| count = ready_scope.where(id: job.id).update_all(locked_at: now, locked_by: worker.name) count == 1 && job.reload @@ -184,7 +184,7 @@ def self.reserve_with_scope_using_optimized_mssql(ready_scope, worker, now) # Get the current time (GMT or local depending on DB) # Note: This does not ping the DB to get the time, so all your clients - # must have syncronized clocks. + # must have synchronized clocks. def self.db_time_now if Time.zone Time.zone.now diff --git a/spec/delayed/backend/active_record_spec.rb b/spec/delayed/backend/active_record_spec.rb index 77d92e8c..5317fe39 100644 --- a/spec/delayed/backend/active_record_spec.rb +++ b/spec/delayed/backend/active_record_spec.rb @@ -21,7 +21,7 @@ end it "raises an argument error on invalid entry" do - expect { configuration.reserve_sql_strategy = :invald }.to raise_error(ArgumentError) + expect { configuration.reserve_sql_strategy = :invalid }.to raise_error(ArgumentError) end end end