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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/new_issue_worker.rb')
-rw-r--r--app/workers/new_issue_worker.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/workers/new_issue_worker.rb b/app/workers/new_issue_worker.rb
index 13936fac1e4..e14f0dc7dfe 100644
--- a/app/workers/new_issue_worker.rb
+++ b/app/workers/new_issue_worker.rb
@@ -13,7 +13,11 @@ class NewIssueWorker # rubocop:disable Scalability/IdempotentWorker
worker_resource_boundary :cpu
weight 2
- def perform(issue_id, user_id)
+ attr_reader :issuable_class
+
+ def perform(issue_id, user_id, issuable_class = 'Issue')
+ @issuable_class = issuable_class.constantize
+
return unless objects_found?(issue_id, user_id)
::EventCreateService.new.open_issue(issuable, user)
@@ -25,8 +29,4 @@ class NewIssueWorker # rubocop:disable Scalability/IdempotentWorker
.new(project: issuable.project, current_user: user)
.execute(issuable)
end
-
- def issuable_class
- Issue
- end
end