Welcome to mirror list, hosted at ThFree Co, Russian Federation.

stuck_jira_import_jobs_worker.rb « jira_import « gitlab « workers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5e675193a8c720d58b9d4dd8f5681351bebef4e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module Gitlab
  module JiraImport
    class StuckJiraImportJobsWorker # rubocop:disable Scalability/IdempotentWorker
      include Gitlab::Import::StuckImportJob

      private

      def track_metrics(with_jid_count, without_jid_count)
        Gitlab::Metrics.add_event(:stuck_jira_import_jobs,
                                  jira_imports_without_jid_count: with_jid_count,
                                  jira_imports_with_jid_count: without_jid_count)
      end

      def enqueued_import_states
        JiraImportState.with_status([:scheduled, :started])
      end
    end
  end
end