Class: JiraImport::UsersImporter
- Inherits:
-
Object
- Object
- JiraImport::UsersImporter
- Defined in:
- app/services/jira_import/users_importer.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(user, project, start_at) ⇒ UsersImporter
constructor
A new instance of UsersImporter.
Constructor Details
#initialize(user, project, start_at) ⇒ UsersImporter
Returns a new instance of UsersImporter.
5 6 7 8 9 |
# File 'app/services/jira_import/users_importer.rb', line 5 def initialize(user, project, start_at) @project = project @start_at = start_at @user = user end |
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'app/services/jira_import/users_importer.rb', line 11 def execute Gitlab::JiraImport.validate_project_settings!(project, user: user) ServiceResponse.success(payload: mapped_users) rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, Errno::ECONNREFUSED, URI::InvalidURIError, JIRA::HTTPError, OpenSSL::SSL::SSLError => error Gitlab::ErrorTracking.log_exception(error, project_id: project.id) ServiceResponse.error(message: "There was an error when communicating to Jira") rescue Projects::ImportService::Error => error ServiceResponse.error(message: error.) end |