diff options
author | Oswaldo Ferreira <oswluizf@gmail.com> | 2016-10-13 18:26:44 +0300 |
---|---|---|
committer | Oswaldo Ferreira <oswluizf@gmail.com> | 2016-11-12 03:54:11 +0300 |
commit | d48d879ef5e0b1517c43bef27f584655535259c8 (patch) | |
tree | 0d0477d0b4f35232fceb8ba83548c29187603caa /app/services/notes | |
parent | 6eeff67c6e03233d4480a55d05d4e0f1a88aef4c (diff) |
Does not raise error when Note not found when processing NewNoteWorker
- Also remove unnecessary param
Diffstat (limited to 'app/services/notes')
-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 |