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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /lib/gitlab/sidekiq_config/worker_matcher.rb
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'lib/gitlab/sidekiq_config/worker_matcher.rb')
-rw-r--r--lib/gitlab/sidekiq_config/worker_matcher.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/gitlab/sidekiq_config/worker_matcher.rb b/lib/gitlab/sidekiq_config/worker_matcher.rb
index fe5ac10c65a..d615d5ecba4 100644
--- a/lib/gitlab/sidekiq_config/worker_matcher.rb
+++ b/lib/gitlab/sidekiq_config/worker_matcher.rb
@@ -10,6 +10,7 @@ module Gitlab
QUERY_TERM_REGEX = %r{^(\w+)(!?=)([\w:#{QUERY_CONCATENATE_OPERATOR}]+)}.freeze
QUERY_PREDICATES = {
+ worker_name: :to_s,
feature_category: :to_sym,
has_external_dependencies: lambda { |value| value == 'true' },
name: :to_s,
@@ -50,7 +51,7 @@ module Gitlab
def predicate_for_term(term)
match = term.match(QUERY_TERM_REGEX)
- raise InvalidTerm.new("Invalid term: #{term}") unless match
+ raise InvalidTerm, "Invalid term: #{term}" unless match
_, lhs, op, rhs = *match
@@ -66,14 +67,14 @@ module Gitlab
else
# This is unreachable because InvalidTerm will be raised instead, but
# keeping it allows to guard against that changing in future.
- raise UnknownOperator.new("Unknown operator: #{op}")
+ raise UnknownOperator, "Unknown operator: #{op}"
end
end
def predicate_factory(lhs, values)
values_block = QUERY_PREDICATES[lhs.to_sym]
- raise UnknownPredicate.new("Unknown predicate: #{lhs}") unless values_block
+ raise UnknownPredicate, "Unknown predicate: #{lhs}" unless values_block
lambda do |queue|
comparator = Array(queue[lhs.to_sym]).to_set