Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ gem "rake"
group :test do
platforms :jruby do
gem "activerecord-jdbcmysql-adapter"
gem "activerecord-jdbcpostgresql-adapter"
# gem "activerecord-jdbcpostgresql-adapter"
gem "activerecord-jdbcsqlite3-adapter"
end

platforms :ruby, :mswin, :mingw do
gem "mysql2", "~> 0.4.5"
gem "pg", "~> 0.18"
# gem "pg"
gem "sqlite3"
end

gem "coveralls", require: false
# gem "coveralls", require: false
gem "rspec", ">= 3"
gem "rubocop"
gem "rubocop-rspec"
Expand Down
148 changes: 72 additions & 76 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,105 +2,101 @@ PATH
remote: .
specs:
delayed_job_active_record (4.1.3)
activerecord (>= 3.0, < 6.1)
activerecord (>= 3.0, < 6.2)
delayed_job (>= 3.0, < 5)

GEM
remote: https://rubygems.org/
specs:
activemodel (5.2.4.1)
activesupport (= 5.2.4.1)
activerecord (5.2.4.1)
activemodel (= 5.2.4.1)
activesupport (= 5.2.4.1)
arel (>= 9.0)
activesupport (5.2.4.1)
activemodel (6.1.7.4)
activesupport (= 6.1.7.4)
activerecord (6.1.7.4)
activemodel (= 6.1.7.4)
activesupport (= 6.1.7.4)
activesupport (6.1.7.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
arel (9.0.0)
ast (2.4.0)
concurrent-ruby (1.1.6)
coveralls (0.7.2)
multi_json (~> 1.3)
rest-client (= 1.6.7)
simplecov (>= 0.7)
term-ansicolor (= 1.2.2)
thor (= 0.18.1)
delayed_job (4.1.8)
activesupport (>= 3.0, < 6.1)
diff-lcs (1.3)
docile (1.3.2)
i18n (1.8.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
ast (2.4.2)
concurrent-ruby (1.2.2)
delayed_job (4.1.11)
activesupport (>= 3.0, < 8.0)
diff-lcs (1.5.0)
docile (1.4.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.4)
json (2.3.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.1009)
minitest (5.14.0)
multi_json (1.14.1)
json (2.6.3)
language_server-protocol (3.17.0.3)
mini_portile2 (2.8.4)
minitest (5.18.1)
mysql2 (0.4.10)
parallel (1.19.1)
parser (2.7.0.4)
ast (~> 2.4.0)
pg (0.21.0)
rainbow (3.0.0)
rake (13.0.1)
rest-client (1.6.7)
mime-types (>= 1.16)
rexml (3.2.4)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.1)
rspec-support (~> 3.9.1)
rspec-expectations (3.9.1)
parallel (1.23.0)
parser (3.2.2.3)
ast (~> 2.4.1)
racc
racc (1.7.1)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.1)
rexml (3.2.5)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.2)
rubocop (0.80.1)
jaro_winkler (~> 1.5.1)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
rubocop (1.54.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 2.7.0.1)
parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
rexml
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7)
rubocop-rspec (1.38.1)
rubocop (>= 0.68.1)
ruby-progressbar (1.10.1)
simplecov (0.17.1)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.18.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.23.1)
rubocop (~> 1.33)
rubocop-rspec (2.22.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.13.0)
simplecov (0.22.0)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
sqlite3 (1.4.2)
term-ansicolor (1.2.2)
tins (~> 0.8)
thor (0.18.1)
thread_safe (0.3.6)
tins (0.13.2)
tzinfo (1.2.6)
thread_safe (~> 0.1)
unicode-display_width (1.6.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
sqlite3 (1.6.3)
mini_portile2 (~> 2.8.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
zeitwerk (2.6.8)

PLATFORMS
ruby

DEPENDENCIES
activerecord-jdbcmysql-adapter
activerecord-jdbcpostgresql-adapter
activerecord-jdbcsqlite3-adapter
coveralls
delayed_job_active_record!
mysql2 (~> 0.4.5)
pg (~> 0.18)
rake
rspec (>= 3)
rubocop
Expand Down
3 changes: 2 additions & 1 deletion delayed_job_active_record.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Gem::Specification.new do |spec|
spec.add_dependency "activerecord", [">= 3.0", "< 6.1"]
spec.add_dependency "activerecord", [">= 3.0", "< 6.2"]
spec.add_dependency "delayed_job", [">= 3.0", "< 5"]
spec.authors = ["Brian Ryckbost", "Matt Griffin", "Erik Michaels-Ober"]
spec.description = "ActiveRecord backend for Delayed::Job, originally authored by Tobias Lütke"
Expand All @@ -11,4 +11,5 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.summary = "ActiveRecord backend for DelayedJob"
spec.version = "4.1.3"
spec.metadata = { "github_repo" => "ssh://github.com/HealthTap/delayed_job_active_record" }
end
3 changes: 3 additions & 0 deletions lib/delayed/backend/active_record/abstract_job.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Delayed::Backend::ActiveRecord::AbstractJob < ::ActiveRecord::Base
self.abstract_class = true
end
2 changes: 1 addition & 1 deletion lib/delayed/backend/active_record/archived_job.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Delayed::Backend::ActiveRecord::ArchivedJob < ::ActiveRecord::Base
class Delayed::Backend::ActiveRecord::ArchivedJob < Delayed::Backend::ActiveRecord::AbstractJob
#attr_accessible :priority, :run_at, :queue, :payload_object, :failed_at, :locked_at, :locked_by,
# :delayed_object_type, :delayed_object_id, :method_name, :args, :unique_digest,
# :attempts, :handler, :last_error
Expand Down
2 changes: 1 addition & 1 deletion lib/delayed/backend/active_record/ht_delayed_job.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Delayed
module Backend
module ActiveRecord
class HtDelayedJob < ::ActiveRecord::Base
class HtDelayedJob < Delayed::Backend::ActiveRecord::AbstractJob
include Delayed::Backend::HtExtension

#attr_accessible :priority, :run_at, :queue, :payload_object,
Expand Down
2 changes: 1 addition & 1 deletion lib/delayed/backend/active_record/old_job.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class Delayed::Backend::ActiveRecord::OldJob < ::ActiveRecord::Base
class Delayed::Backend::ActiveRecord::OldJob < Delayed::Backend::ActiveRecord::AbstractJob
self.table_name = 'delayed_jobs'
end
2 changes: 1 addition & 1 deletion lib/delayed/backend/ht_extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def archive
begin
tries ||= 3
self.destroy
rescue ActiveRecord::Deadlocked
rescue ::ActiveRecord::Deadlocked
retry unless (tries -= 1).zero?
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/delayed_job_active_record.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require 'active_record'
require 'delayed_job'
require 'delayed/backend/active_record'
require 'delayed/backend/active_record/abstract_job'
require 'delayed/backend/active_record/archived_job'
require 'delayed/backend/active_record/old_job'
require 'delayed/backend/active_record/ht_delayed_job'
Expand Down