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
8f14d3c1
Commit
8f14d3c1
authored
Jul 30, 2019
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sidekiq memory killer warning message
parent
52af120f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
lib/gitlab/sidekiq_middleware/memory_killer.rb
lib/gitlab/sidekiq_middleware/memory_killer.rb
+1
-1
spec/lib/gitlab/sidekiq_middleware/memory_killer_spec.rb
spec/lib/gitlab/sidekiq_middleware/memory_killer_spec.rb
+5
-2
No files found.
lib/gitlab/sidekiq_middleware/memory_killer.rb
View file @
8f14d3c1
...
...
@@ -84,7 +84,7 @@ module Gitlab
end
def
warn
(
message
,
signal:
nil
)
Sidekiq
.
logger
.
warn
(
class:
worker
.
class
,
pid:
pid
,
signal:
signal
,
message:
message
)
Sidekiq
.
logger
.
warn
(
class:
worker
.
class
.
name
,
pid:
pid
,
signal:
signal
,
message:
message
)
end
end
end
...
...
spec/lib/gitlab/sidekiq_middleware/memory_killer_spec.rb
View file @
8f14d3c1
...
...
@@ -4,7 +4,7 @@ describe Gitlab::SidekiqMiddleware::MemoryKiller do
subject
{
described_class
.
new
}
let
(
:pid
)
{
999
}
let
(
:worker
)
{
double
(
:worker
,
class:
'TestWorker'
)
}
let
(
:worker
)
{
double
(
:worker
,
class:
ProjectCacheWorker
)
}
let
(
:job
)
{
{
'jid'
=>
123
}
}
let
(
:queue
)
{
'test_queue'
}
...
...
@@ -46,7 +46,10 @@ describe Gitlab::SidekiqMiddleware::MemoryKiller do
expect
(
Process
).
to
receive
(
:kill
).
with
(
'SIGKILL'
,
pid
).
ordered
expect
(
Sidekiq
.
logger
)
.
to
receive
(
:warn
).
with
(
class:
'TestWorker'
,
message:
anything
,
pid:
pid
,
signal:
anything
).
at_least
(
:once
)
.
to
receive
(
:warn
).
with
(
class:
'ProjectCacheWorker'
,
message:
anything
,
pid:
pid
,
signal:
anything
).
at_least
(
:once
)
run
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