diff options
author | Nick Schonning <nschonni@gmail.com> | 2023-02-20 00:58:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 06:58:28 +0100 |
commit | 717683d1c39d2fe85d1cc3f5223e1f4cf43f1900 (patch) | |
tree | adf7a7e93197707196ff3fdc7ca476deffede365 /app/workers/scheduler | |
parent | d2dcb6c45a9db5439772f0553046e2c03a739a16 (diff) |
Autofix Rubocop remaining Layout rules (#23679)
Diffstat (limited to 'app/workers/scheduler')
-rw-r--r-- | app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb b/app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb index cc5b6e137..09e0b37f0 100644 --- a/app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb +++ b/app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb @@ -62,6 +62,7 @@ class Scheduler::AccountsStatusesCleanupScheduler # The idea here is to loop through all policies at least once until the budget is exhausted # and start back after the last processed account otherwise break if budget.zero? || (num_processed_accounts.zero? && first_policy_id.nil?) + first_policy_id = nil end end @@ -73,6 +74,7 @@ class Scheduler::AccountsStatusesCleanupScheduler def under_load? return true if Sidekiq::Stats.new.retry_size > MAX_RETRY_SIZE + queue_under_load?('default', MAX_DEFAULT_SIZE, MAX_DEFAULT_LATENCY) || queue_under_load?('push', MAX_PUSH_SIZE, MAX_PUSH_LATENCY) || queue_under_load?('pull', MAX_PULL_SIZE, MAX_PULL_LATENCY) end |