Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f4e59f28
Commit
f4e59f28
authored
Aug 25, 2020
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dependency on NoSpaceLeft
parent
f7696d50
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
app/services/issue_rebalancing_service.rb
app/services/issue_rebalancing_service.rb
+1
-3
app/workers/issue_rebalancing_worker.rb
app/workers/issue_rebalancing_worker.rb
+1
-1
No files found.
app/services/issue_rebalancing_service.rb
View file @
f4e59f28
...
@@ -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
...
...
app/workers/issue_rebalancing_worker.rb
View file @
f4e59f28
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment