2021-02-23 10:10:47 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Namespaces
|
|
|
|
class OnboardingProgressWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
|
2021-07-21 08:09:35 -04:00
|
|
|
data_consistency :always
|
|
|
|
|
2021-04-30 14:10:09 -04:00
|
|
|
sidekiq_options retry: 3
|
|
|
|
|
2021-09-22 11:12:06 -04:00
|
|
|
feature_category :onboarding
|
2021-07-30 02:08:52 -04:00
|
|
|
worker_resource_boundary :cpu
|
2021-02-23 10:10:47 -05:00
|
|
|
urgency :low
|
|
|
|
|
|
|
|
deduplicate :until_executed
|
|
|
|
idempotent!
|
|
|
|
|
|
|
|
def perform(namespace_id, action)
|
|
|
|
namespace = Namespace.find_by_id(namespace_id)
|
|
|
|
return unless namespace && action
|
|
|
|
|
|
|
|
OnboardingProgressService.new(namespace).execute(action: action.to_sym)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|