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/analytics/instance_statistics/count_job_trigger_worker.rb')
-rw-r--r--app/workers/analytics/instance_statistics/count_job_trigger_worker.rb18
1 files changed, 3 insertions, 15 deletions
diff --git a/app/workers/analytics/instance_statistics/count_job_trigger_worker.rb b/app/workers/analytics/instance_statistics/count_job_trigger_worker.rb
index 81a765d5d08..3ec92bc7635 100644
--- a/app/workers/analytics/instance_statistics/count_job_trigger_worker.rb
+++ b/app/workers/analytics/instance_statistics/count_job_trigger_worker.rb
@@ -2,31 +2,19 @@
module Analytics
module InstanceStatistics
+ # This worker will be removed in 14.0
class CountJobTriggerWorker
include ApplicationWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
- DEFAULT_DELAY = 3.minutes.freeze
-
feature_category :devops_reports
urgency :low
idempotent!
def perform
- recorded_at = Time.zone.now
-
- worker_arguments = Gitlab::Analytics::InstanceStatistics::WorkersArgumentBuilder.new(
- measurement_identifiers: ::Analytics::InstanceStatistics::Measurement.measurement_identifier_values,
- recorded_at: recorded_at
- ).execute
-
- perform_in = DEFAULT_DELAY.minutes.from_now
- worker_arguments.each do |args|
- CounterJobWorker.perform_in(perform_in, *args)
-
- perform_in += DEFAULT_DELAY
- end
+ # Delegate to the new worker
+ Analytics::UsageTrends::CountJobTriggerWorker.new.perform
end
end
end