Commit 195ce97a authored by Leni Kadali Mutungi's avatar Leni Kadali Mutungi Committed by Arturo Herrero

Remove PropagateServiceTemplateWorker and queue

Deleted the PropagateServiceTemplateWorker and removed references to it
in the all_queues YAML file as well as the Sidekiq worker spec.

As part of the worker removal, we're adding a post deploy clean up
migration to clear any pending jobs that could be on the queue.

Changelog: other
parent 19fdd373
...@@ -2717,15 +2717,6 @@ ...@@ -2717,15 +2717,6 @@
:weight: 1 :weight: 1
:idempotent: true :idempotent: true
:tags: [] :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 - :name: reactive_caching
:worker_name: ReactiveCachingWorker :worker_name: ReactiveCachingWorker
:feature_category: :not_owned :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 @@ ...@@ -351,8 +351,6 @@
- 1 - 1
- - propagate_integration_project - - propagate_integration_project
- 1 - 1
- - propagate_service_template
- 1
- - reactive_caching - - reactive_caching
- 1 - 1
- - rebase - - 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 ...@@ -398,7 +398,6 @@ RSpec.describe 'Every Sidekiq worker' do
'PropagateIntegrationInheritWorker' => 3, 'PropagateIntegrationInheritWorker' => 3,
'PropagateIntegrationProjectWorker' => 3, 'PropagateIntegrationProjectWorker' => 3,
'PropagateIntegrationWorker' => 3, 'PropagateIntegrationWorker' => 3,
'PropagateServiceTemplateWorker' => 3,
'PurgeDependencyProxyCacheWorker' => 3, 'PurgeDependencyProxyCacheWorker' => 3,
'ReactiveCachingWorker' => 3, 'ReactiveCachingWorker' => 3,
'RebaseWorker' => 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