Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-04 18:06:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-04 18:06:38 +0300
commit5ecacec30458330df5fa6d591dc58e37afb41cd4 (patch)
tree58a9c004fdae78cbedbcc616dcfa783a1172eea3 /lib
parent0d46bf06388d485824bc2f1e736b92b2a8a397e4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/import_export/project_tree_restorer.rb4
-rw-r--r--lib/gitlab/sidekiq_config.rb14
-rw-r--r--lib/tasks/frontend.rake5
3 files changed, 16 insertions, 7 deletions
diff --git a/lib/gitlab/import_export/project_tree_restorer.rb b/lib/gitlab/import_export/project_tree_restorer.rb
index edee4ba2486..9beb84a2422 100644
--- a/lib/gitlab/import_export/project_tree_restorer.rb
+++ b/lib/gitlab/import_export/project_tree_restorer.rb
@@ -120,7 +120,7 @@ module Gitlab
end
end
- def remove_feature_dependent_sub_relations(_relation_item)
+ def remove_feature_dependent_sub_relations!(_relation_item)
# no-op
end
@@ -191,7 +191,7 @@ module Gitlab
# Avoid keeping a possible heavy object in memory once we are done with it
while relation_item = tree_array.shift
- remove_feature_dependent_sub_relations(relation_item)
+ remove_feature_dependent_sub_relations!(relation_item)
# The transaction at this level is less speedy than one single transaction
# But we can't have it in the upper level or GC won't get rid of the AR objects
diff --git a/lib/gitlab/sidekiq_config.rb b/lib/gitlab/sidekiq_config.rb
index c102fa14cfc..ffceeb68f20 100644
--- a/lib/gitlab/sidekiq_config.rb
+++ b/lib/gitlab/sidekiq_config.rb
@@ -5,7 +5,11 @@ require 'set'
module Gitlab
module SidekiqConfig
- QUEUE_CONFIG_PATHS = %w[app/workers/all_queues.yml ee/app/workers/all_queues.yml].freeze
+ QUEUE_CONFIG_PATHS = begin
+ result = %w[app/workers/all_queues.yml]
+ result << 'ee/app/workers/all_queues.yml' if Gitlab.ee?
+ result
+ end.freeze
# This method is called by `ee/bin/sidekiq-cluster` in EE, which runs outside
# of bundler/Rails context, so we cannot use any gem or Rails methods.
@@ -48,9 +52,11 @@ module Gitlab
end
def self.workers
- @workers ||=
- find_workers(Rails.root.join('app', 'workers')) +
- find_workers(Rails.root.join('ee', 'app', 'workers'))
+ @workers ||= begin
+ result = find_workers(Rails.root.join('app', 'workers'))
+ result.concat(find_workers(Rails.root.join('ee', 'app', 'workers'))) if Gitlab.ee?
+ result
+ end
end
def self.find_workers(root)
diff --git a/lib/tasks/frontend.rake b/lib/tasks/frontend.rake
index 1cac7520227..6e90229830d 100644
--- a/lib/tasks/frontend.rake
+++ b/lib/tasks/frontend.rake
@@ -2,7 +2,10 @@ unless Rails.env.production?
namespace :frontend do
desc 'GitLab | Frontend | Generate fixtures for JavaScript tests'
RSpec::Core::RakeTask.new(:fixtures, [:pattern]) do |t, args|
- args.with_defaults(pattern: '{spec,ee/spec}/frontend/fixtures/*.rb')
+ directories = %w[spec]
+ directories << 'ee/spec' if Gitlab.ee?
+ directory_glob = "{#{directories.join(',')}}"
+ args.with_defaults(pattern: "#{directory_glob}/frontend/fixtures/*.rb")
ENV['NO_KNAPSACK'] = 'true'
t.pattern = args[:pattern]
t.rspec_opts = '--format documentation'