Class: Projects::ImportExport::ImportCompletionNotificationWorker
- Inherits:
-
Object
- Object
- Projects::ImportExport::ImportCompletionNotificationWorker
- Includes:
- ApplicationWorker
- Defined in:
- app/workers/projects/import_export/import_completion_notification_worker.rb
Constant Summary
Constants included from ApplicationWorker
ApplicationWorker::LOGGING_EXTRA_KEY, ApplicationWorker::SAFE_PUSH_BULK_LIMIT
Constants included from Gitlab::Loggable
Constants included from WorkerAttributes
WorkerAttributes::DEFAULT_CONCURRENCY_LIMIT_PERCENTAGE_BY_URGENCY, WorkerAttributes::DEFAULT_DATA_CONSISTENCY, WorkerAttributes::DEFAULT_DATA_CONSISTENCY_PER_DB, WorkerAttributes::DEFAULT_DEFER_DELAY, WorkerAttributes::LOAD_BALANCED_DATA_CONSISTENCIES, WorkerAttributes::NAMESPACE_WEIGHTS, WorkerAttributes::VALID_DATA_CONSISTENCIES, WorkerAttributes::VALID_RESOURCE_BOUNDARIES, WorkerAttributes::VALID_URGENCIES
Instance Attribute Summary collapse
-
#notify_group_owners ⇒ Object
readonly
Returns the value of attribute notify_group_owners.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
-
#safe_import_url ⇒ Object
readonly
Returns the value of attribute safe_import_url.
-
#user_mapping_enabled ⇒ Object
readonly
Returns the value of attribute user_mapping_enabled.
Instance Method Summary collapse
Methods included from Gitlab::Loggable
Methods included from Gitlab::SidekiqVersioning::Worker
Methods included from WorkerContext
Instance Attribute Details
#notify_group_owners ⇒ Object (readonly)
Returns the value of attribute notify_group_owners.
13 14 15 |
# File 'app/workers/projects/import_export/import_completion_notification_worker.rb', line 13 def notify_group_owners @notify_group_owners end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
13 14 15 |
# File 'app/workers/projects/import_export/import_completion_notification_worker.rb', line 13 def project @project end |
#safe_import_url ⇒ Object (readonly)
Returns the value of attribute safe_import_url.
13 14 15 |
# File 'app/workers/projects/import_export/import_completion_notification_worker.rb', line 13 def safe_import_url @safe_import_url end |
#user_mapping_enabled ⇒ Object (readonly)
Returns the value of attribute user_mapping_enabled.
13 14 15 |
# File 'app/workers/projects/import_export/import_completion_notification_worker.rb', line 13 def user_mapping_enabled @user_mapping_enabled end |
Instance Method Details
#perform(project_id, params = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/workers/projects/import_export/import_completion_notification_worker.rb', line 15 def perform(project_id, params = {}) @project = Project.find_by_id(project_id) @user_mapping_enabled = params['user_mapping_enabled'] @notify_group_owners = params['notify_group_owners'] @safe_import_url = params['safe_import_url'] return unless project return unless project.notify_project_import_complete? send_completion_notification end |