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
31f2eb9b
Commit
31f2eb9b
authored
Aug 21, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
de7e43eb
f04cc4d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
VERSION
VERSION
+1
-1
lib/gitlab/sidekiq_middleware/monitor.rb
lib/gitlab/sidekiq_middleware/monitor.rb
+5
-1
spec/lib/gitlab/sidekiq_middleware/monitor_spec.rb
spec/lib/gitlab/sidekiq_middleware/monitor_spec.rb
+9
-1
No files found.
VERSION
View file @
31f2eb9b
12.
2
.0-pre
12.
3
.0-pre
lib/gitlab/sidekiq_middleware/monitor.rb
View file @
31f2eb9b
...
...
@@ -8,8 +8,12 @@ module Gitlab
yield
end
rescue
Gitlab
::
SidekiqMonitor
::
CancelledError
# push job to DeadSet
payload
=
::
Sidekiq
.
dump_json
(
job
)
::
Sidekiq
::
DeadSet
.
new
.
kill
(
payload
,
notify_failure:
false
)
# ignore retries
raise
Sidekiq
::
JobRetry
::
Skip
raise
::
Sidekiq
::
JobRetry
::
Skip
end
end
end
...
...
spec/lib/gitlab/sidekiq_middleware/monitor_spec.rb
View file @
31f2eb9b
...
...
@@ -33,9 +33,17 @@ describe Gitlab::SidekiqMiddleware::Monitor do
end
end
it
'
does skip this
job'
do
it
'
skips the
job'
do
expect
{
subject
}.
to
raise_error
(
Sidekiq
::
JobRetry
::
Skip
)
end
it
'puts job in DeadSet'
do
::
Sidekiq
::
DeadSet
.
new
.
clear
expect
do
subject
rescue
Sidekiq
::
JobRetry
::
Skip
end
.
to
change
{
::
Sidekiq
::
DeadSet
.
new
.
size
}.
by
(
1
)
end
end
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