Commit bdb9a723 authored by Alper Akgun's avatar Alper Akgun

Merge branch '335178-remove-propagate-service-template-worker' into 'master'

Remove PropagateServiceTemplateWorker and references to it

See merge request gitlab-org/gitlab!73387
parents c9563929 195ce97a
......@@ -2717,15 +2717,6 @@
:weight: 1
:idempotent: true
:tags: []
- :name: propagate_service_template
:worker_name: PropagateServiceTemplateWorker
:feature_category: :integrations
:has_external_dependencies:
:urgency: :low
:resource_boundary: :unknown
:weight: 1
:idempotent:
:tags: []
- :name: reactive_caching
:worker_name: ReactiveCachingWorker
:feature_category: :not_owned
......
# frozen_string_literal: true
# No longer in use https://gitlab.com/groups/gitlab-org/-/epics/5672
# To be removed https://gitlab.com/gitlab-org/gitlab/-/issues/335178
class PropagateServiceTemplateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
data_consistency :always
sidekiq_options retry: 3
feature_category :integrations
LEASE_TIMEOUT = 4.hours.to_i
def perform(template_id)
return unless try_obtain_lease_for(template_id)
::Integrations::PropagateTemplateService.propagate(Integration.find_by_id(template_id))
end
private
def try_obtain_lease_for(template_id)
Gitlab::ExclusiveLease
.new("propagate_service_template_worker:#{template_id}", timeout: LEASE_TIMEOUT)
.try_obtain
end
end
......@@ -351,8 +351,6 @@
- 1
- - propagate_integration_project
- 1
- - propagate_service_template
- 1
- - reactive_caching
- 1
- - rebase
......
# frozen_string_literal: true
class RemovePropagateServiceTemplateWorker < Gitlab::Database::Migration[1.0]
def up
Sidekiq::Queue.new('propagate_service_template').clear
end
def down
# no-op
end
end
d16d62b2984586540a99aa5fc67de6459a4cd473089ddbae8d45e8783863d78d
\ No newline at end of file
......@@ -398,7 +398,6 @@ RSpec.describe 'Every Sidekiq worker' do
'PropagateIntegrationInheritWorker' => 3,
'PropagateIntegrationProjectWorker' => 3,
'PropagateIntegrationWorker' => 3,
'PropagateServiceTemplateWorker' => 3,
'PurgeDependencyProxyCacheWorker' => 3,
'ReactiveCachingWorker' => 3,
'RebaseWorker' => 3,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment