From 58cb120aa2657033b2ffc03092fdb6cca22d78df Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Thu, 3 Jun 2021 09:37:06 +0800 Subject: [PATCH] DEV: Minor code clean up in assets.rake. (#13245) --- lib/tasks/assets.rake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index 9263f015206..85debe82334 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -176,10 +176,9 @@ def compress(from, to) end def concurrent? - executor = Concurrent::FixedThreadPool.new(Concurrent.processor_count) - if ENV["SPROCKETS_CONCURRENT"] == "1" concurrent_compressors = [] + executor = Concurrent::FixedThreadPool.new(Concurrent.processor_count) yield(Proc.new { |&block| concurrent_compressors << Concurrent::Future.execute(executor: executor) { block.call } }) concurrent_compressors.each(&:wait!) else