Skip to content

Commit 6d1252c

Browse files
dixpacdhh
andauthored
Remove sucker_punch ActiveJob::Queue adapter (rails#52935)
* Remove sucker_punch ActiveJob::Queue adapter Removes sucker_punch dependecy. SuckerPunch existed before ActiveJob, but ultimately uses similar code to `AsyncAdapter` under the covers. * Update CHANGELOG.md --------- Co-authored-by: David Heinemeier Hansson <[email protected]>
1 parent 6e46b42 commit 6d1252c

File tree

11 files changed

+7
-73
lines changed

11 files changed

+7
-73
lines changed

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ group :job do
104104
gem "resque", require: false
105105
gem "resque-scheduler", require: false
106106
gem "sidekiq", require: false
107-
gem "sucker_punch", require: false
108107
gem "delayed_job", require: false
109108
gem "queue_classic", ">= 4.0.0", require: false, platforms: :ruby
110109
gem "sneakers", require: false

Gemfile.lock

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,6 @@ GEM
584584
stimulus-rails (1.3.0)
585585
railties (>= 6.0.0)
586586
stringio (3.1.1)
587-
sucker_punch (3.2.0)
588-
concurrent-ruby (~> 1.0)
589587
syntax_tree (6.1.1)
590588
prettier_print (>= 1.2.0)
591589
tailwindcss-rails (2.1.0)
@@ -713,7 +711,6 @@ DEPENDENCIES
713711
sqlite3 (>= 2.0)
714712
stackprof
715713
stimulus-rails
716-
sucker_punch
717714
syntax_tree (= 6.1.1)
718715
tailwindcss-rails
719716
terser (>= 1.1.4)

activejob/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
* Remove `sucker_punch` as an adapter option [since author himself recommends using AJ's own AsyncAdapter](https://github.com/brandonhilkert/sucker_punch?tab=readme-ov-file#faq).
2+
If you're using this adapter, change to `adapter: async` for the same functionality.
3+
4+
*Dino Maric*
5+
16
* Use `RAILS_MAX_THREADS` in `ActiveJob::AsyncAdapter`. If it is not set, use 5 as default.
27

38
*heka1024*

activejob/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require "rake/testtask"
44

5-
ACTIVEJOB_ADAPTERS = %w(async inline delayed_job queue_classic resque sidekiq sneakers sucker_punch backburner test)
5+
ACTIVEJOB_ADAPTERS = %w(async inline delayed_job queue_classic resque sidekiq sneakers backburner test)
66
ACTIVEJOB_ADAPTERS.delete("queue_classic") if defined?(JRUBY_VERSION)
77

88
task default: :test

activejob/lib/active_job/queue_adapters.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ module ActiveJob
1212
# * {Resque}[https://github.com/resque/resque]
1313
# * {Sidekiq}[https://sidekiq.org]
1414
# * {Sneakers}[https://github.com/jondot/sneakers]
15-
# * {Sucker Punch}[https://github.com/brandonhilkert/sucker_punch]
1615
# * Please Note: We are not accepting pull requests for new adapters. See the {README}[link:files/activejob/README_md.html] for more details.
1716
#
1817
# For testing and development Active Job has three built-in adapters:
@@ -32,7 +31,6 @@ module ActiveJob
3231
# | Resque | Yes | Yes | Yes (Gem) | Queue | Global | Yes |
3332
# | Sidekiq | Yes | Yes | Yes | Queue | No | Job |
3433
# | Sneakers | Yes | Yes | No | Queue | Queue | No |
35-
# | Sucker Punch | Yes | Yes | Yes | No | No | No |
3634
# | Active Job Async | Yes | Yes | Yes | No | No | No |
3735
# | Active Job Inline | No | Yes | N/A | N/A | N/A | N/A |
3836
# | Active Job Test | No | Yes | N/A | N/A | N/A | N/A |
@@ -124,7 +122,6 @@ module QueueAdapters
124122
autoload :ResqueAdapter
125123
autoload :SidekiqAdapter
126124
autoload :SneakersAdapter
127-
autoload :SuckerPunchAdapter
128125
autoload :TestAdapter
129126

130127
ADAPTER = "Adapter"

activejob/lib/active_job/queue_adapters/sucker_punch_adapter.rb

Lines changed: 0 additions & 49 deletions
This file was deleted.

activejob/test/adapters/sucker_punch.rb

Lines changed: 0 additions & 4 deletions
This file was deleted.

activejob/test/cases/test_case_test.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ def test_set_test_adapter
4141
ActiveJob::QueueAdapters::SidekiqAdapter
4242
when :sneakers
4343
ActiveJob::QueueAdapters::SneakersAdapter
44-
when :sucker_punch
45-
ActiveJob::QueueAdapters::SuckerPunchAdapter
4644
else
4745
raise NotImplementedError.new
4846
end

activejob/test/integration/queuing_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class QueuingTest < ActiveSupport::TestCase
1313
assert_job_executed
1414
end
1515

16-
unless adapter_is?(:inline, :async, :sucker_punch)
16+
unless adapter_is?(:inline, :async)
1717
test "should not run jobs queued on a non-listening queue" do
1818
old_queue = TestJob.queue_name
1919

activejob/test/support/integration/adapters/sucker_punch.rb

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)