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
86996ee3
Commit
86996ee3
authored
Jan 29, 2020
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable existing BulkPerformWithContext offenses
So we can go through them one by one to fix them
parent
d93a1355
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
12 additions
and
12 deletions
+12
-12
app/services/merge_requests/migrate_external_diffs_service.rb
...services/merge_requests/migrate_external_diffs_service.rb
+1
-1
app/services/user_project_access_changed_service.rb
app/services/user_project_access_changed_service.rb
+1
-1
app/workers/issue_due_scheduler_worker.rb
app/workers/issue_due_scheduler_worker.rb
+1
-1
ee/app/models/elasticsearch_indexed_namespace.rb
ee/app/models/elasticsearch_indexed_namespace.rb
+2
-2
ee/app/services/elastic/index_projects_by_range_service.rb
ee/app/services/elastic/index_projects_by_range_service.rb
+1
-1
ee/app/services/geo/files_expire_service.rb
ee/app/services/geo/files_expire_service.rb
+1
-1
ee/app/workers/elastic_namespace_indexer_worker.rb
ee/app/workers/elastic_namespace_indexer_worker.rb
+2
-2
ee/lib/tasks/gitlab/elastic.rake
ee/lib/tasks/gitlab/elastic.rake
+1
-1
lib/gitlab/file_hook.rb
lib/gitlab/file_hook.rb
+1
-1
spec/workers/concerns/application_worker_spec.rb
spec/workers/concerns/application_worker_spec.rb
+1
-1
No files found.
app/services/merge_requests/migrate_external_diffs_service.rb
View file @
86996ee3
...
...
@@ -9,7 +9,7 @@ module MergeRequests
def
self
.
enqueue!
ids
=
MergeRequestDiff
.
ids_for_external_storage_migration
(
limit:
MAX_JOBS
)
MigrateExternalDiffsWorker
.
bulk_perform_async
(
ids
.
map
{
|
id
|
[
id
]
})
MigrateExternalDiffsWorker
.
bulk_perform_async
(
ids
.
map
{
|
id
|
[
id
]
})
# rubocop:disable Scalability/BulkPerformWithContext
end
def
initialize
(
merge_request_diff
)
...
...
app/services/user_project_access_changed_service.rb
View file @
86996ee3
...
...
@@ -11,7 +11,7 @@ class UserProjectAccessChangedService
if
blocking
AuthorizedProjectsWorker
.
bulk_perform_and_wait
(
bulk_args
)
else
AuthorizedProjectsWorker
.
bulk_perform_async
(
bulk_args
)
AuthorizedProjectsWorker
.
bulk_perform_async
(
bulk_args
)
# rubocop:disable Scalability/BulkPerformWithContext
end
end
end
...
...
app/workers/issue_due_scheduler_worker.rb
View file @
86996ee3
...
...
@@ -10,7 +10,7 @@ class IssueDueSchedulerWorker
def
perform
project_ids
=
Issue
.
opened
.
due_tomorrow
.
group
(
:project_id
).
pluck
(
:project_id
).
map
{
|
id
|
[
id
]
}
MailScheduler
::
IssueDueWorker
.
bulk_perform_async
(
project_ids
)
MailScheduler
::
IssueDueWorker
.
bulk_perform_async
(
project_ids
)
# rubocop:disable Scalability/BulkPerformWithContext
end
# rubocop: enable CodeReuse/ActiveRecord
end
ee/app/models/elasticsearch_indexed_namespace.rb
View file @
86996ee3
...
...
@@ -41,7 +41,7 @@ class ElasticsearchIndexedNamespace < ApplicationRecord
jobs
=
batch_ids
.
map
{
|
id
|
[
id
,
:index
]
}
ElasticNamespaceIndexerWorker
.
bulk_perform_async
(
jobs
)
ElasticNamespaceIndexerWorker
.
bulk_perform_async
(
jobs
)
# rubocop:disable Scalability/BulkPerformWithContext
end
end
...
...
@@ -58,7 +58,7 @@ class ElasticsearchIndexedNamespace < ApplicationRecord
jobs
=
batch_ids
.
map
{
|
id
|
[
id
,
:delete
]
}
ElasticNamespaceIndexerWorker
.
bulk_perform_async
(
jobs
)
ElasticNamespaceIndexerWorker
.
bulk_perform_async
(
jobs
)
# rubocop:disable Scalability/BulkPerformWithContext
end
end
...
...
ee/app/services/elastic/index_projects_by_range_service.rb
View file @
86996ee3
...
...
@@ -18,7 +18,7 @@ module Elastic
end
args
.
each_slice
(
BULK_PERFORM_SIZE
)
do
|
args
|
ElasticFullIndexWorker
.
bulk_perform_async
(
args
)
ElasticFullIndexWorker
.
bulk_perform_async
(
args
)
# rubocop:disable Scalability/BulkPerformWithContext
end
end
end
...
...
ee/app/services/geo/files_expire_service.rb
View file @
86996ee3
...
...
@@ -53,7 +53,7 @@ module Geo
end
end
Geo
::
FileRemovalWorker
.
bulk_perform_async
(
paths_to_remove
)
Geo
::
FileRemovalWorker
.
bulk_perform_async
(
paths_to_remove
)
# rubocop:disable Scalability/BulkPerformWithContext
end
# rubocop: enable CodeReuse/ActiveRecord
...
...
ee/app/workers/elastic_namespace_indexer_worker.rb
View file @
86996ee3
...
...
@@ -27,14 +27,14 @@ class ElasticNamespaceIndexerWorker
# https://www.rubydoc.info/github/mperham/sidekiq/Sidekiq%2FClient:push_bulk
namespace
.
all_projects
.
find_in_batches
do
|
batch
|
args
=
batch
.
map
{
|
project
|
[
:index
,
project
.
class
.
to_s
,
project
.
id
,
project
.
es_id
]
}
ElasticIndexerWorker
.
bulk_perform_async
(
args
)
ElasticIndexerWorker
.
bulk_perform_async
(
args
)
# rubocop:disable Scalability/BulkPerformWithContext
end
end
def
delete_from_index
(
namespace
)
namespace
.
all_projects
.
find_in_batches
do
|
batch
|
args
=
batch
.
map
{
|
project
|
[
:delete
,
project
.
class
.
to_s
,
project
.
id
,
project
.
es_id
]
}
ElasticIndexerWorker
.
bulk_perform_async
(
args
)
ElasticIndexerWorker
.
bulk_perform_async
(
args
)
# rubocop:disable Scalability/BulkPerformWithContext
end
end
end
ee/lib/tasks/gitlab/elastic.rake
View file @
86996ee3
...
...
@@ -22,7 +22,7 @@ namespace :gitlab do
[
:index
,
'Project'
,
id
,
nil
]
# es_id is unused for :index
end
ElasticIndexerWorker
.
bulk_perform_async
(
args
)
ElasticIndexerWorker
.
bulk_perform_async
(
args
)
# rubocop:disable Scalability/BulkPerformWithContext
print
"."
end
...
...
lib/gitlab/file_hook.rb
View file @
86996ee3
...
...
@@ -17,7 +17,7 @@ module Gitlab
def
self
.
execute_all_async
(
data
)
args
=
files
.
map
{
|
file
|
[
file
,
data
]
}
FileHookWorker
.
bulk_perform_async
(
args
)
FileHookWorker
.
bulk_perform_async
(
args
)
# rubocop:disable Scalability/BulkPerformWithContext
end
def
self
.
execute
(
file
,
data
)
...
...
spec/workers/concerns/application_worker_spec.rb
View file @
86996ee3
...
...
@@ -38,7 +38,7 @@ describe ApplicationWorker do
describe
'.bulk_perform_async'
do
it
'enqueues jobs in bulk'
do
Sidekiq
::
Testing
.
fake!
do
worker
.
bulk_perform_async
([[
'Foo'
,
[
1
]],
[
'Foo'
,
[
2
]]])
worker
.
bulk_perform_async
([[
'Foo'
,
[
1
]],
[
'Foo'
,
[
2
]]])
# rubocop:disable Scalability/BulkPerformWithContext
expect
(
worker
.
jobs
.
count
).
to
eq
2
expect
(
worker
.
jobs
).
to
all
(
include
(
'enqueued_at'
))
...
...
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