Skip to content

Commit

Permalink
Reduce limit for RemoveOldThrottlesJob (#6199)
Browse files Browse the repository at this point in the history
* Longer timeout for remove old throttles job

* reduce limits rather than increase timeout

changelog: Internal, Maintenance, Reduce limit for background job that cleans up old Throttle database rows
  • Loading branch information
mitchellhenke authored Apr 15, 2022
1 parent c3f6119 commit 6b733cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/jobs/remove_old_throttles_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class RemoveOldThrottlesJob < ApplicationJob

discard_on GoodJob::ActiveJobExtensions::Concurrency::ConcurrencyExceededError

def perform(now, limit: 1000, total_limit: 100_000)
def perform(now, limit: 500, total_limit: 50_000)
max_window = Throttle::THROTTLE_CONFIG.map { |_, config| config[:attempt_window] }.max
total_removed = 0

Expand Down

0 comments on commit 6b733cf

Please sign in to comment.