...@@ -89,6 +89,14 @@ module WorkerAttributes ...@@ -89,6 +89,14 @@ module WorkerAttributes
worker_attributes[:resource_boundary] || :unknown worker_attributes[:resource_boundary] || :unknown
end end
def idempotent!
worker_attributes[:idempotent] = true
end
def idempotent?
worker_attributes[:idempotent]
end
def weight(value) def weight(value)
worker_attributes[:weight] = value worker_attributes[:weight] = value
end end
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
class ContainerExpirationPolicyWorker class ContainerExpirationPolicyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
class CreateCommitSignatureWorker class CreateCommitSignatureWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
feature_category :source_code_management feature_category :source_code_management
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
class CreateEvidenceWorker class CreateEvidenceWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
feature_category :release_governance feature_category :release_governance
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
class CreateNoteDiffFileWorker class CreateNoteDiffFileWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
feature_category :source_code_management feature_category :source_code_management
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
class CreatePipelineWorker class CreatePipelineWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
class DeleteContainerRepositoryWorker class DeleteContainerRepositoryWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
include ExclusiveLeaseGuard include ExclusiveLeaseGuard
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
class DeleteDiffFilesWorker class DeleteDiffFilesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
feature_category :source_code_management feature_category :source_code_management
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
class DeleteMergedBranchesWorker class DeleteMergedBranchesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
feature_category :source_code_management feature_category :source_code_management
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
class DeleteStoredFilesWorker class DeleteStoredFilesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
feature_category_not_owned! feature_category_not_owned!
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
class DeleteUserWorker class DeleteUserWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
feature_category :authentication_and_authorization feature_category :authentication_and_authorization
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
module Deployments module Deployments
class FinishedWorker class FinishedWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
queue_namespace :deployment queue_namespace :deployment
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
module Deployments module Deployments
class ForwardDeploymentWorker class ForwardDeploymentWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
queue_namespace :deployment queue_namespace :deployment
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
module Deployments module Deployments
class SuccessWorker class SuccessWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
queue_namespace :deployment queue_namespace :deployment
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
class DetectRepositoryLanguagesWorker class DetectRepositoryLanguagesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
include ExceptionBacktrace include ExceptionBacktrace
include ExclusiveLeaseGuard include ExclusiveLeaseGuard
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
class EmailReceiverWorker class EmailReceiverWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
feature_category :issue_tracking feature_category :issue_tracking
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
class EmailsOnPushWorker class EmailsOnPushWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
attr_reader :email, :skip_premailer attr_reader :email, :skip_premailer
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
module Environments module Environments
class AutoStopCronWorker class AutoStopCronWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
... ...
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# If a link to a different GitLab issue exists, a new link # If a link to a different GitLab issue exists, a new link
# will still be created, but will not be visible in Sentry # will still be created, but will not be visible in Sentry
# until the prior link is deleted. # until the prior link is deleted.
class ErrorTrackingIssueLinkWorker class ErrorTrackingIssueLinkWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
include ExclusiveLeaseGuard include ExclusiveLeaseGuard
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
class ExpireBuildArtifactsWorker class ExpireBuildArtifactsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext # rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context # This worker does not perform work scoped to a context
... ...
......