Skip to content

Commit 396f231

Browse files
committed
fixup: remove Solid Queue specific logic from adapter methods
1 parent 0fd03e6 commit 396f231

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

sentry-rails/spec/active_job/support/harness.rb

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,9 @@
2020
end
2121

2222
def boot_adapter(adapter)
23-
case adapter
24-
when :solid_queue
25-
Sentry::Rails::Test::Application.load_queue_schema
26-
end
2723
end
2824

2925
def reset_adapter(adapter)
30-
case adapter
31-
when :solid_queue
32-
[
33-
SolidQueue::ReadyExecution,
34-
SolidQueue::ClaimedExecution,
35-
SolidQueue::FailedExecution,
36-
SolidQueue::BlockedExecution,
37-
SolidQueue::ScheduledExecution,
38-
SolidQueue::RecurringExecution,
39-
SolidQueue::Process,
40-
SolidQueue::Job
41-
].each(&:delete_all)
42-
end
4326
end
4427

4528
def drain(at: nil)
@@ -55,14 +38,6 @@ def drain(at: nil)
5538
kwargs = at ? { at: at } : {}
5639
perform_enqueued_jobs(**kwargs)
5740
end
58-
when :solid_queue
59-
process = SolidQueue::Process.register(
60-
kind: "Worker",
61-
pid: ::Process.pid,
62-
name: "spec-#{SecureRandom.hex(4)}"
63-
)
64-
65-
SolidQueue::ReadyExecution.claim("*", 100, process.id).each(&:perform)
6641
else
6742
raise NotImplementedError, "active_job backend harness has no drain strategy for adapter: #{adapter.inspect}"
6843
end

0 commit comments

Comments
 (0)