Commit f4e59f28 authored by Alex Kalderimis's avatar Alex Kalderimis

Remove dependency on NoSpaceLeft

parent f7696d50
...@@ -34,9 +34,7 @@ class IssueRebalancingService ...@@ -34,9 +34,7 @@ class IssueRebalancingService
end end
# If there are 4 billion issues, then we cannot rebalance them # If there are 4 billion issues, then we cannot rebalance them
if gap_size < RelativePositioning::MIN_GAP raise TooManyIssues if gap_size < RelativePositioning::MIN_GAP
raise RelativePositioning::NoSpaceLeft
end
start = RelativePositioning::START_POSITION - (gaps / 2) * gap_size start = RelativePositioning::START_POSITION - (gaps / 2) * gap_size
......
...@@ -11,7 +11,7 @@ class IssueRebalancingWorker # rubocop:disable Scalability/IdempotentWorker ...@@ -11,7 +11,7 @@ class IssueRebalancingWorker # rubocop:disable Scalability/IdempotentWorker
issue = Issue.find(issue_id) issue = Issue.find(issue_id)
rebalance(issue) rebalance(issue)
rescue ActiveRecord::RecordNotFound, IssueRebalancingService::TooManyIssues, RelativePositioning::NoSpaceLeft => e rescue ActiveRecord::RecordNotFound, IssueRebalancingService::TooManyIssues => e
Sidekiq.logger.warn(e) Sidekiq.logger.warn(e)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment