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 'lib/gitlab/usage_counters')
-rw-r--r--lib/gitlab/usage_counters/common.rb30
-rw-r--r--lib/gitlab/usage_counters/pod_logs.rb11
2 files changed, 0 insertions, 41 deletions
diff --git a/lib/gitlab/usage_counters/common.rb b/lib/gitlab/usage_counters/common.rb
deleted file mode 100644
index a5bdac430f4..00000000000
--- a/lib/gitlab/usage_counters/common.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module UsageCounters
- class Common
- class << self
- def increment(project_id)
- Gitlab::Redis::SharedState.with { |redis| redis.hincrby(base_key, project_id, 1) }
- end
-
- def usage_totals
- Gitlab::Redis::SharedState.with do |redis|
- total_sum = 0
-
- totals = redis.hgetall(base_key).each_with_object({}) do |(project_id, count), result|
- total_sum += result[project_id.to_i] = count.to_i
- end
-
- totals[:total] = total_sum
- totals
- end
- end
-
- def base_key
- raise NotImplementedError
- end
- end
- end
- end
-end
diff --git a/lib/gitlab/usage_counters/pod_logs.rb b/lib/gitlab/usage_counters/pod_logs.rb
deleted file mode 100644
index 94e29d2fad7..00000000000
--- a/lib/gitlab/usage_counters/pod_logs.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module UsageCounters
- class PodLogs < Common
- def self.base_key
- 'POD_LOGS_USAGE_COUNTS'
- end
- end
- end
-end