diff options
Diffstat (limited to 'app/workers/concerns/gitlab/github_import/stage_methods.rb')
-rw-r--r-- | app/workers/concerns/gitlab/github_import/stage_methods.rb | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/app/workers/concerns/gitlab/github_import/stage_methods.rb b/app/workers/concerns/gitlab/github_import/stage_methods.rb index 75db5589415..80013ff3cd9 100644 --- a/app/workers/concerns/gitlab/github_import/stage_methods.rb +++ b/app/workers/concerns/gitlab/github_import/stage_methods.rb @@ -3,6 +3,21 @@ module Gitlab module GithubImport module StageMethods + extend ActiveSupport::Concern + + included do + include ApplicationWorker + + sidekiq_retries_exhausted do |msg, e| + Gitlab::Import::ImportFailureService.track( + project_id: msg['args'][0], + exception: e, + error_source: self.class.name, + fail_import: true + ) + end + end + # project_id - The ID of the GitLab project to import the data into. def perform(project_id) info(project_id, message: 'starting stage') @@ -29,7 +44,8 @@ module Gitlab project_id: project_id, exception: e, error_source: self.class.name, - fail_import: abort_on_failure + fail_import: false, + metrics: true ) raise(e) @@ -51,10 +67,6 @@ module Gitlab # rubocop: enable CodeReuse/ActiveRecord end - def abort_on_failure - false - end - private def info(project_id, extra = {}) |