lib/external_count_fetcher.rb
# Public: fetches all counts from external services. This is a high latency call and shouldn't only be called from a user request as a last resort
#
# reset - true|false  - if true, will fetch counters even if already set.
fetches all counts from external services. This is a high latency call and shouldn't only be called from a user request as a last resort
reset - true|false  - if true, will fetch counters even if already set.
fetches all counts from external services . This is a high latency call and shouldn ' t only be called from a user request as a last resort reset - true|false - if true will fetch counters even if already set .
def fetch_empty_counts!(reset: false)
    threads = []
    REDIS_KEYS.each do |key|
      threads << Thread.new do
        fetch_count(counter_key: key, reset: reset) if !redis_counter(key).exists? || reset
      end
    end
    threads.each &:join
  end
def fetch_empty_counts! ( reset : false ) threads = [ ] REDIS_KEYS . each do | key | threads << Thread . new do fetch_count ( counter_key : key , reset : reset ) if ! redis_counter ( key ) . exists? || reset end end threads . each & :join end
Public: fetches all counts from external services.
Public : fetches all counts from external services .
reset
<not_specific>