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
2291a39c
Commit
2291a39c
authored
Oct 03, 2019
by
Qingyu Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow config Sidekiq worker memory limit in ENV
parent
c53455e4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
app/workers/gitlab/github_import/stage/finish_import_worker.rb
...orkers/gitlab/github_import/stage/finish_import_worker.rb
+4
-0
app/workers/gitlab/github_import/stage/import_repository_worker.rb
...rs/gitlab/github_import/stage/import_repository_worker.rb
+4
-0
app/workers/repository_import_worker.rb
app/workers/repository_import_worker.rb
+4
-0
No files found.
app/workers/gitlab/github_import/stage/finish_import_worker.rb
View file @
2291a39c
...
...
@@ -8,6 +8,10 @@ module Gitlab
include
GithubImport
::
Queue
include
StageMethods
# technical debt: https://gitlab.com/gitlab-org/gitlab/issues/33991
sidekiq_options
memory_killer_memory_growth_kb:
ENV
.
fetch
(
'MEMORY_KILLER_FINISH_IMPORT_WORKER_MEMORY_GROWTH_KB'
,
50
).
to_i
sidekiq_options
memory_killer_max_memory_growth_kb:
ENV
.
fetch
(
'MEMORY_KILLER_FINISH_IMPORT_WORKER_MAX_MEMORY_GROWTH_KB'
,
200_000
).
to_i
# project - An instance of Project.
def
import
(
_
,
project
)
project
.
after_import
...
...
app/workers/gitlab/github_import/stage/import_repository_worker.rb
View file @
2291a39c
...
...
@@ -8,6 +8,10 @@ module Gitlab
include
GithubImport
::
Queue
include
StageMethods
# technical debt: https://gitlab.com/gitlab-org/gitlab/issues/33991
sidekiq_options
memory_killer_memory_growth_kb:
ENV
.
fetch
(
'MEMORY_KILLER_IMPORT_REPOSITORY_WORKER_MEMORY_GROWTH_KB'
,
50
).
to_i
sidekiq_options
memory_killer_max_memory_growth_kb:
ENV
.
fetch
(
'MEMORY_KILLER_IMPORT_REPOSITORY_WORKER_MAX_MEMORY_GROWTH_KB'
,
300_000
).
to_i
# client - An instance of Gitlab::GithubImport::Client.
# project - An instance of Project.
def
import
(
client
,
project
)
...
...
app/workers/repository_import_worker.rb
View file @
2291a39c
...
...
@@ -6,6 +6,10 @@ class RepositoryImportWorker
include
ProjectStartImport
include
ProjectImportOptions
# technical debt: https://gitlab.com/gitlab-org/gitlab/issues/33991
sidekiq_options
memory_killer_memory_growth_kb:
ENV
.
fetch
(
'MEMORY_KILLER_REPOSITORY_IMPORT_WORKER_MEMORY_GROWTH_KB'
,
50
).
to_i
sidekiq_options
memory_killer_max_memory_growth_kb:
ENV
.
fetch
(
'MEMORY_KILLER_REPOSITORY_IMPORT_WORKER_MAX_MEMORY_GROWTH_KB'
,
300_000
).
to_i
def
perform
(
project_id
)
@project
=
Project
.
find
(
project_id
)
...
...
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