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:
Diffstat (limited to 'app/workers/concerns')
-rw-r--r--app/workers/concerns/chaos_queue.rb2
-rw-r--r--app/workers/concerns/git_garbage_collect_methods.rb6
-rw-r--r--app/workers/concerns/packages/cleanup_artifact_worker.rb6
-rw-r--r--app/workers/concerns/reactive_cacheable_worker.rb5
-rw-r--r--app/workers/concerns/worker_attributes.rb8
5 files changed, 14 insertions, 13 deletions
diff --git a/app/workers/concerns/chaos_queue.rb b/app/workers/concerns/chaos_queue.rb
index a9c557f0175..23e58b5182b 100644
--- a/app/workers/concerns/chaos_queue.rb
+++ b/app/workers/concerns/chaos_queue.rb
@@ -5,6 +5,6 @@ module ChaosQueue
included do
queue_namespace :chaos
- feature_category_not_owned!
+ feature_category :not_owned # rubocop:todo Gitlab/AvoidFeatureCategoryNotOwned
end
end
diff --git a/app/workers/concerns/git_garbage_collect_methods.rb b/app/workers/concerns/git_garbage_collect_methods.rb
index 13b7e7b5b1f..308ffacfc6b 100644
--- a/app/workers/concerns/git_garbage_collect_methods.rb
+++ b/app/workers/concerns/git_garbage_collect_methods.rb
@@ -121,8 +121,12 @@ module GitGarbageCollectMethods
end.new(repository)
end
+ # The option to enable/disable bitmaps has been removed in https://gitlab.com/gitlab-org/gitlab/-/issues/353777
+ # Now the options is always enabled
+ # This method and all the deprecated RPCs are going to be removed in
+ # https://gitlab.com/gitlab-org/gitlab/-/issues/353779
def bitmaps_enabled?
- Gitlab::CurrentSettings.housekeeping_bitmaps_enabled
+ true
end
def flush_ref_caches(resource)
diff --git a/app/workers/concerns/packages/cleanup_artifact_worker.rb b/app/workers/concerns/packages/cleanup_artifact_worker.rb
index d4ad023b4a8..a01d7e8abba 100644
--- a/app/workers/concerns/packages/cleanup_artifact_worker.rb
+++ b/app/workers/concerns/packages/cleanup_artifact_worker.rb
@@ -14,7 +14,9 @@ module Packages
artifact.destroy!
rescue StandardError
- artifact&.error!
+ unless artifact&.destroyed?
+ artifact&.update_column(:status, :error)
+ end
end
after_destroy
@@ -48,7 +50,7 @@ module Packages
to_delete = next_item
if to_delete
- to_delete.processing!
+ to_delete.update_column(:status, :processing)
log_cleanup_item(to_delete)
end
diff --git a/app/workers/concerns/reactive_cacheable_worker.rb b/app/workers/concerns/reactive_cacheable_worker.rb
index 78fcf8087c2..a598b8a9d7d 100644
--- a/app/workers/concerns/reactive_cacheable_worker.rb
+++ b/app/workers/concerns/reactive_cacheable_worker.rb
@@ -8,7 +8,10 @@ module ReactiveCacheableWorker
sidekiq_options retry: 3
- feature_category_not_owned!
+ # Feature category is different depending on the model that is using the
+ # reactive cache. Identified by the `related_class` attribute.
+ feature_category :not_owned # rubocop:todo Gitlab/AvoidFeatureCategoryNotOwned
+
loggable_arguments 0
def self.context_for_arguments(arguments)
diff --git a/app/workers/concerns/worker_attributes.rb b/app/workers/concerns/worker_attributes.rb
index 6f91418e38c..8f7a3da5429 100644
--- a/app/workers/concerns/worker_attributes.rb
+++ b/app/workers/concerns/worker_attributes.rb
@@ -35,17 +35,9 @@ module WorkerAttributes
class_methods do
def feature_category(value, *extras)
- raise "Invalid category. Use `feature_category_not_owned!` to mark a worker as not owned" if value == :not_owned
-
set_class_attribute(:feature_category, value)
end
- # Special case: mark this work as not associated with a feature category
- # this should be used for cross-cutting concerns, such as mailer workers.
- def feature_category_not_owned!
- set_class_attribute(:feature_category, :not_owned)
- end
-
# Special case: if a worker is not owned, get the feature category
# (if present) from the calling context.
def get_feature_category