stringer-rss/stringer

View on GitHub
app/commands/feed/fetch_all.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

require "thread/pool"

module Feed::FetchAll
  def self.call
    pool = Thread.pool(10)

    Feed.find_each { |feed| pool.process { Feed::FetchOne.call(feed) } }

    pool.shutdown
  end
end