diff --git a/Gemfile b/Gemfile index 25850ff34e6..4db7994309d 100644 --- a/Gemfile +++ b/Gemfile @@ -49,7 +49,7 @@ group :job do gem 'backburner', require: false gem 'qu-rails', github: "bkeepers/qu", branch: "master", require: false gem 'qu-redis', require: false - # gem 'delayed_job_active_record', require: false + gem 'delayed_job_active_record', require: false gem 'sequel', require: false end diff --git a/Gemfile.lock b/Gemfile.lock index e34449a7b0c..0dc7559d9ea 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -117,6 +117,9 @@ GEM dante (0.1.5) delayed_job (4.0.6) activesupport (>= 3.0, < 5.0) + delayed_job_active_record (4.0.3) + activerecord (>= 3.0, < 5.0) + delayed_job (>= 3.0, < 4.1) erubis (2.7.0) execjs (2.3.0) globalid (0.3.3) @@ -252,6 +255,7 @@ DEPENDENCIES coffee-rails (~> 4.1.0) dalli (>= 2.2.1) delayed_job + delayed_job_active_record jquery-rails! json kindlerb (= 0.1.1) diff --git a/activejob/test/support/integration/adapters/qu.rb b/activejob/test/support/integration/adapters/qu.rb index 3a5b66a057c..256ddb3cf3f 100644 --- a/activejob/test/support/integration/adapters/qu.rb +++ b/activejob/test/support/integration/adapters/qu.rb @@ -3,7 +3,7 @@ module QuJobsManager require 'qu-rails' require 'qu-redis' ActiveJob::Base.queue_adapter = :qu - ENV['REDISTOGO_URL'] = "tcp://127.0.0.1:6379/12" + ENV['REDISTOGO_URL'] = "redis://127.0.0.1:6379/12" backend = Qu::Backend::Redis.new backend.namespace = "active_jobs_int_test" Qu.backend = backend diff --git a/activejob/test/support/integration/adapters/queue_classic.rb b/activejob/test/support/integration/adapters/queue_classic.rb index 038473ccdcc..f522b2711f2 100644 --- a/activejob/test/support/integration/adapters/queue_classic.rb +++ b/activejob/test/support/integration/adapters/queue_classic.rb @@ -1,6 +1,7 @@ module QueueClassicJobsManager def setup ENV['QC_DATABASE_URL'] ||= 'postgres:///active_jobs_qc_int_test' + ENV['QC_RAILS_DATABASE'] = 'false' ENV['QC_LISTEN_TIME'] = "0.5" uri = URI.parse(ENV['QC_DATABASE_URL']) user = uri.user||ENV['USER'] @@ -20,7 +21,8 @@ module QueueClassicJobsManager end def start_workers - QC::Conn.disconnect + QC.default_conn_adapter.disconnect + QC.default_conn_adapter = nil @pid = fork do worker = QC::Worker.new(q_name: 'integration_tests') worker.start