Sha256: b2c2266bc8ca1207dcbee9aa4f4c6cac03df18091c7edb754d1efcce08fd948a
Contents?: true
Size: 540 Bytes
Versions: 6
Compression:
Stored size: 540 Bytes
Contents
# frozen_string_literal: true module Sidekiq module Throttled class Strategy module Base def limit(job_args = nil) @limit.respond_to?(:call) ? @limit.call(*job_args) : @limit end private def key(job_args) key = @base_key.dup return key unless @key_suffix key << ":#{@key_suffix.call(*job_args)}" rescue StandardError => e Sidekiq.logger.error "Failed to get key suffix: #{e}" raise e end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems