From 2b88ce16f78cc2861ce2b2b79caf2685e1e70b4f Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Thu, 8 Oct 2020 11:24:18 -0500 Subject: [PATCH] Remove parallel since it's unused --- Gemfile | 1 - Gemfile.lock | 5 ----- lib/parallel_ar.rb | 18 ------------------ 3 files changed, 24 deletions(-) delete mode 100644 lib/parallel_ar.rb diff --git a/Gemfile b/Gemfile index 8370212f..d6426228 100755 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,6 @@ gem 'jbuilder', '~> 2.10' gem 'bootsnap', '~> 1.4', require: false # Large rails application booting enhancer gem 'font_assets', '~> 0.1.14' # for serving fonts on cdn https://github.com/ericallam/font_assets gem 'hamster', '~> 3.0' # Thread-safe collection classes for Ruby -gem 'parallel', '~> 1.17' # run processes in parallel gem 'puma_worker_killer', '~> 0.1.1' # TODO: Investigate why puma workers need to be killed. gem 'puma', '~> 4.0', '>= 4.0.1' gem 'rake', '~> 12.3.2' diff --git a/Gemfile.lock b/Gemfile.lock index 8b65089b..e80ce2d5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -98,7 +98,6 @@ GEM zeitwerk (~> 2.2, >= 2.2.2) addressable (2.6.0) public_suffix (>= 2.0.2, < 4.0) - amq-protocol (2.3.0) andand (1.3.3) ast (2.4.0) babel-source (5.8.35) @@ -109,8 +108,6 @@ GEM bootsnap (1.4.4) msgpack (~> 1.0) builder (3.2.4) - bunny (2.14.2) - amq-protocol (~> 2.3, >= 2.3.0) byebug (11.0.1) chronic (0.10.2) coderay (1.1.2) @@ -419,7 +416,6 @@ DEPENDENCIES action_mailer_matchers (~> 1.2) bess! bootsnap (~> 1.4) - bunny (~> 2.14, >= 2.14.2) byebug (~> 11.0, >= 11.0.1) chronic (~> 0.10.2) colorize (~> 0.8.1) @@ -446,7 +442,6 @@ DEPENDENCIES mail_view (~> 2.0) money (~> 6.13) nearest_time_zone (~> 0.0.4) - parallel (~> 1.17) parallel_tests (~> 2.32) param_validation! pg (~> 0.11) diff --git a/lib/parallel_ar.rb b/lib/parallel_ar.rb deleted file mode 100644 index fbf3c454..00000000 --- a/lib/parallel_ar.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -# License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later -# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE -require 'parallel' - -module ParallelAr - def self.reduce(arr, accum, &block) - Parallel.each(arr, in_threads: 8) do |elem| - ActiveRecord::Base.connection_pool.with_connection do - ActiveRecord::Base.transaction do - accum = block.call(accum, elem) - end - end - end - accum - end -end