Skip to content

Commit

Permalink
Merge pull request #159 from matt-domsch-sp/honor-limit-at-startup
Browse files Browse the repository at this point in the history
Honor existing deployed limits
  • Loading branch information
deanpcmad committed Feb 25, 2024
2 parents 7ee7bdd + d946dc3 commit 8a24a0c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/sidekiq/limit_fetch/queues.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ def apply_process_limit_to_queues

def apply_process_limit_to_queue(queue_name)
queue = Sidekiq::Queue[queue_name]
return unless queue.process_limit.nil? # honor existing deployed limits

queue.process_limit = @process_limits[queue_name.to_s] || @process_limits[queue_name.to_sym]
end

Expand All @@ -155,6 +157,7 @@ def apply_limit_to_queue(queue_name)
queue = Sidekiq::Queue[queue_name]

return if queue.limit_changed?
return unless queue.limit.nil? # honor existing deployed limits

queue.limit = @limits[queue_name.to_s] || @limits[queue_name.to_sym]
end
Expand Down

0 comments on commit 8a24a0c

Please sign in to comment.