diff options
Diffstat (limited to 'app/services/notes/create_service.rb')
-rw-r--r-- | app/services/notes/create_service.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/services/notes/create_service.rb b/app/services/notes/create_service.rb index 723cc0e6834..e338792412b 100644 --- a/app/services/notes/create_service.rb +++ b/app/services/notes/create_service.rb @@ -26,9 +26,12 @@ module Notes note.note = content end - if !only_commands && note.save + note.run_after_commit do # Finish the harder work in the background - NewNoteWorker.perform_in(2.seconds, note.id, params) + NewNoteWorker.perform_async(note.id) + end + + if !only_commands && note.save todo_service.new_note(note, current_user) end |