Skip to content

Commit a077e13

Browse files
committed
Always qualify ActiveRecord::Base
Change-Id: I8c34ab89ce2182fea686f26bb829778f9251c024 Reviewed-on: https://gerrit.instructure.com/c/inst-jobs/+/295679 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
1 parent 2ea2b0a commit a077e13

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
inst-jobs (3.1.4)
4+
inst-jobs (3.1.5)
55
activerecord (>= 6.0)
66
activerecord-pg-extensions (~> 0.4.4)
77
activesupport (>= 6.0)

lib/delayed/backend/active_record.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class Job < AbstractJob
2929

3030
def self.reconnect!
3131
if Rails.version < "6.1"
32-
ActiveRecord::Base.connection_handler.clear_all_connections!
32+
::ActiveRecord::Base.connection_handler.clear_all_connections!
3333
else
34-
ActiveRecord::Base.connection_handler.clear_all_connections!(nil)
34+
::ActiveRecord::Base.connection_handler.clear_all_connections!(nil)
3535
end
3636
end
3737

lib/delayed/version.rb

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

33
module Delayed
4-
VERSION = "3.1.4"
4+
VERSION = "3.1.5"
55
end

lib/delayed/work_queue/parent_process/server.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,9 @@ def unlock_prefetched_jobs
227227
# otherwise just reconnect and let it retry
228228
logger.warn("failed to unlock prefetched jobs - connection terminated; skipping for now")
229229
if Rails.version < "6.1"
230-
Delayed::Job.clear_all_connections!
230+
::Delayed::Job.clear_all_connections!
231231
else
232-
Delayed::Job.clear_all_connections!(nil)
232+
::Delayed::Job.clear_all_connections!(nil)
233233
end
234234
end
235235
end

spec/delayed/work_queue/parent_process/server_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def ==(other)
4040
end
4141

4242
after do
43-
File.unlink("/tmp/inst-jobs-test.sock") if File.exist?("/tmp/inst-jobs-test.sock")
43+
FileUtils.rm_f("/tmp/inst-jobs-test.sock")
4444
Delayed::Worker.lifecycle.reset!
4545
end
4646

spec/delayed/work_queue/parent_process_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
end
1818

1919
after do
20-
File.unlink("/tmp/inst-jobs-test.sock") if File.exist?("/tmp/inst-jobs-test.sock")
20+
FileUtils.rm_f("/tmp/inst-jobs-test.sock")
2121
Delayed::Worker.lifecycle.reset!
2222
end
2323

0 commit comments

Comments
 (0)