From 9bb8c3d6616eaaf19e6f1ff612730c384cfcd43f Mon Sep 17 00:00:00 2001 From: Manuel Meurer Date: Thu, 10 Oct 2024 09:30:38 +0200 Subject: [PATCH] remove sidekiq --- Gemfile | 2 -- Gemfile.lock | 12 ------------ config/puma.rb | 21 --------------------- config/routes.rb | 14 -------------- 4 files changed, 49 deletions(-) diff --git a/Gemfile b/Gemfile index b65b4fa..fec6da0 100644 --- a/Gemfile +++ b/Gemfile @@ -25,8 +25,6 @@ gem "redis-namespace", "~> 1.11" gem "redis", "~> 5.0" gem "sdoc", github: "rails/sdoc" # TODO: use released version when 3.x is released gem "sentry-rails", "~> 5.5" -gem "sentry-sidekiq", "~> 5.5" -gem "sidekiq", "~> 7.2" gem "sitemap_generator", "~> 6.3" gem "sqlite3", "~> 2.0" gem "stimulus-rails", "~> 1.3" diff --git a/Gemfile.lock b/Gemfile.lock index 744e741..5a0c8e4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -172,7 +172,6 @@ GEM activemodel (>= 6.0.0) activesupport (>= 6.0.0) redis (>= 4.2, < 6) - logger (1.6.1) loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -288,15 +287,6 @@ GEM sentry-ruby (5.21.0) bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) - sentry-sidekiq (5.21.0) - sentry-ruby (~> 5.21.0) - sidekiq (>= 3.0) - sidekiq (7.3.2) - concurrent-ruby (< 2) - connection_pool (>= 2.3.0) - logger - rack (>= 2.2.4) - redis-client (>= 0.22.2) sitemap_generator (6.3.0) builder (~> 3.0) sqlite3 (2.1.0-arm64-darwin) @@ -350,8 +340,6 @@ DEPENDENCIES redis-namespace (~> 1.11) sdoc! sentry-rails (~> 5.5) - sentry-sidekiq (~> 5.5) - sidekiq (~> 7.2) sitemap_generator (~> 6.3) sqlite3 (~> 2.0) stimulus-rails (~> 1.3) diff --git a/config/puma.rb b/config/puma.rb index cde435e..32af41e 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require "sidekiq" - threads_count = ENV.fetch("RAILS_MAX_THREADS", 3) threads threads_count, threads_count @@ -17,22 +15,3 @@ end preload_app! - -sidekiq = nil - -on_worker_boot do - Sidekiq.default_job_options = { - "retry" => false - } - Sidekiq.strict_args!(:warn) - sidekiq = Sidekiq.configure_embed do |config| - config.concurrency = 1 - config.redis = { - url: Baseline::RedisURL.fetch - } - end.tap(&:run) -end - -on_worker_shutdown do - sidekiq&.stop -end diff --git a/config/routes.rb b/config/routes.rb index 3ad504b..1b29b37 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,18 +1,4 @@ -require "sidekiq/web" - -if Rails.env.production? - Sidekiq::Web.use Rack::Auth::Basic do |username, password| - { - username => "SIDEKIQ_USERNAME", - password => "SIDEKIQ_PASSWORD" - }.map { ActiveSupport::SecurityUtils.secure_compare _1, ENV.fetch(_2) } - .all? - end -end - Rails.application.routes.draw do - mount Sidekiq::Web => "sidekiq" - root "application#home" get "up" => "rails/health#show", as: :rails_health_check