diff options
Diffstat (limited to 'app/workers/gitlab/github_import/stage/import_base_data_worker.rb')
-rw-r--r-- | app/workers/gitlab/github_import/stage/import_base_data_worker.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/workers/gitlab/github_import/stage/import_base_data_worker.rb b/app/workers/gitlab/github_import/stage/import_base_data_worker.rb index 715c39caf42..cc6a2255160 100644 --- a/app/workers/gitlab/github_import/stage/import_base_data_worker.rb +++ b/app/workers/gitlab/github_import/stage/import_base_data_worker.rb @@ -31,6 +31,22 @@ module Gitlab project.import_state.refresh_jid_expiration ImportPullRequestsWorker.perform_async(project.id) + rescue StandardError => e + Gitlab::Import::ImportFailureService.track( + project_id: project.id, + error_source: self.class.name, + exception: e, + fail_import: abort_on_failure, + metrics: true + ) + + raise(e) + end + + private + + def abort_on_failure + true end end end |