Commit f4e59f28 authored by Alex Kalderimis's avatar Alex Kalderimis

Remove dependency on NoSpaceLeft

parent f7696d50
......@@ -34,9 +34,7 @@ class IssueRebalancingService
end
# If there are 4 billion issues, then we cannot rebalance them
if gap_size < RelativePositioning::MIN_GAP
raise RelativePositioning::NoSpaceLeft
end
raise TooManyIssues if gap_size < RelativePositioning::MIN_GAP
start = RelativePositioning::START_POSITION - (gaps / 2) * gap_size
......
......@@ -11,7 +11,7 @@ class IssueRebalancingWorker # rubocop:disable Scalability/IdempotentWorker
issue = Issue.find(issue_id)
rebalance(issue)
rescue ActiveRecord::RecordNotFound, IssueRebalancingService::TooManyIssues, RelativePositioning::NoSpaceLeft => e
rescue ActiveRecord::RecordNotFound, IssueRebalancingService::TooManyIssues => e
Sidekiq.logger.warn(e)
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