diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-08-08 00:21:29 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-08-08 00:21:29 +0300 |
commit | c94990820a2ea3cfc16099e318fcce5354a3c052 (patch) | |
tree | 2ea9dd5333d8ea7a3b00e7b7e81ece014da679d6 /app/services/issues/create_service.rb | |
parent | 44131d5c2adfbf2dde16bba6621143037409c68b (diff) | |
parent | 9ef3c431e4859e1bc03267735b956d5920d5dd42 (diff) |
Merge branch '32844-issuables-performance' into 'master'
Issuables: Move some code from create services to Sidekiq workers
See merge request !13326
Diffstat (limited to 'app/services/issues/create_service.rb')
-rw-r--r-- | app/services/issues/create_service.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/services/issues/create_service.rb b/app/services/issues/create_service.rb index 718a7ac1f22..9114f0ccc81 100644 --- a/app/services/issues/create_service.rb +++ b/app/services/issues/create_service.rb @@ -15,11 +15,14 @@ module Issues def before_create(issue) spam_check(issue, current_user) issue.move_to_end + + user = current_user + issue.run_after_commit do + NewIssueWorker.perform_async(issue.id, user.id) + end end def after_create(issuable) - event_service.open_issue(issuable, current_user) - notification_service.new_issue(issuable, current_user) todo_service.new_issue(issuable, current_user) user_agent_detail_service.create resolve_discussions_with_issue(issuable) |