DEV: Minor code clean up in assets.rake. (#13245)
This commit is contained in:
parent
b57dca90fc
commit
58cb120aa2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue