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
1b8a7918
Commit
1b8a7918
authored
Nov 22, 2018
by
Douwe Maan
Committed by
Stan Hu
Nov 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear BatchLoader context between Sidekiq jobs
parent
ba9eeea4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
changelogs/unreleased/dm-batch-loader-sidekiq.yml
changelogs/unreleased/dm-batch-loader-sidekiq.yml
+5
-0
config/initializers/sidekiq.rb
config/initializers/sidekiq.rb
+1
-0
lib/gitlab/sidekiq_middleware/batch_loader.rb
lib/gitlab/sidekiq_middleware/batch_loader.rb
+13
-0
No files found.
changelogs/unreleased/dm-batch-loader-sidekiq.yml
0 → 100644
View file @
1b8a7918
---
title
:
Clear BatchLoader context between Sidekiq jobs
merge_request
:
23308
author
:
type
:
fixed
config/initializers/sidekiq.rb
View file @
1b8a7918
...
...
@@ -20,6 +20,7 @@ Sidekiq.configure_server do |config|
chain
.
add
Gitlab
::
SidekiqMiddleware
::
ArgumentsLogger
if
ENV
[
'SIDEKIQ_LOG_ARGUMENTS'
]
&&
!
enable_json_logs
chain
.
add
Gitlab
::
SidekiqMiddleware
::
Shutdown
chain
.
add
Gitlab
::
SidekiqMiddleware
::
RequestStoreMiddleware
unless
ENV
[
'SIDEKIQ_REQUEST_STORE'
]
==
'0'
chain
.
add
Gitlab
::
SidekiqMiddleware
::
BatchLoader
chain
.
add
Gitlab
::
SidekiqStatus
::
ServerMiddleware
end
...
...
lib/gitlab/sidekiq_middleware/batch_loader.rb
0 → 100644
View file @
1b8a7918
# frozen_string_literal: true
module
Gitlab
module
SidekiqMiddleware
class
BatchLoader
def
call
(
worker
,
job
,
queue
)
yield
ensure
::
BatchLoader
::
Executor
.
clear_current
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