OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Deliver notification mails immediately to run in same transaction
Oliver Günther3109d7bafa27
diff --git a/app/services/notifications/mail_service/comment_strategy.rb b/app/services/notifications/mail_service/comment_strategy.rbindex 735fd2d43a6..41dc42bfd4c 100644--- a/app/services/notifications/mail_service/comment_strategy.rb+++ b/app/services/notifications/mail_service/comment_strategy.rb@@ -35,7 +35,7 @@ module Notifications::MailService::CommentStrategynotification.resource,notification.resource.author || DeletedUser.first)- .deliver_later+ .deliver_nowendendenddiff --git a/app/services/notifications/mail_service/message_strategy.rb b/app/services/notifications/mail_service/message_strategy.rbindex 95bc15b0185..93381c3782b 100644--- a/app/services/notifications/mail_service/message_strategy.rb+++ b/app/services/notifications/mail_service/message_strategy.rb@@ -35,7 +35,7 @@ module Notifications::MailService::MessageStrategynotification.resource,notification.actor || DeletedUser.first)- .deliver_later+ .deliver_nowendendenddiff --git a/app/services/notifications/mail_service/news_strategy.rb b/app/services/notifications/mail_service/news_strategy.rbindex 454e88eb48b..0ca31ee7aff 100644--- a/app/services/notifications/mail_service/news_strategy.rb+++ b/app/services/notifications/mail_service/news_strategy.rb@@ -37,7 +37,7 @@ module Notifications::MailService::NewsStrategynotification.journal.journable,notification.journal.user || DeletedUser.first)- .deliver_later+ .deliver_nowendendenddiff --git a/app/services/notifications/mail_service/wiki_content_strategy.rb b/app/services/notifications/mail_service/wiki_content_strategy.rbindex 74cbd5381b1..005908d8343 100644--- a/app/services/notifications/mail_service/wiki_content_strategy.rb+++ b/app/services/notifications/mail_service/wiki_content_strategy.rb@@ -36,7 +36,7 @@ module Notifications::MailService::WikiContentStrategynotification.recipient,notification.journal.journable,notification.journal.user || DeletedUser.first)- .deliver_later+ .deliver_nowendprivatediff --git a/spec/services/notifications/mail_service_spec.rb b/spec/services/notifications/mail_service_spec.rbindex 795c18a7e92..a22d18c3100 100644--- a/spec/services/notifications/mail_service_spec.rb+++ b/spec/services/notifications/mail_service_spec.rb@@ -71,7 +71,7 @@ describe Notifications::MailService, type: :model do.and_return(mail)allow(mail)- .to receive(:deliver_later)+ .to receive(:deliver_now)end@@ -94,7 +94,7 @@ describe Notifications::MailService, type: :model dojournal.user)expect(mail)- .to have_received(:deliver_later)+ .to have_received(:deliver_now)endend@@ -111,7 +111,7 @@ describe Notifications::MailService, type: :model dojournal.user)expect(mail)- .to have_received(:deliver_later)+ .to have_received(:deliver_now)endend@@ -152,7 +152,7 @@ describe Notifications::MailService, type: :model do.and_return(mail)allow(mail)- .to receive(:deliver_later)+ .to receive(:deliver_now)end@@ -175,7 +175,7 @@ describe Notifications::MailService, type: :model dojournal.user)expect(mail)- .to have_received(:deliver_later)+ .to have_received(:deliver_now)endend@@ -215,7 +215,7 @@ describe Notifications::MailService, type: :model do.and_return(mail)allow(mail)- .to receive(:deliver_later)+ .to receive(:deliver_now)end@@ -234,7 +234,7 @@ describe Notifications::MailService, type: :model doactor)expect(mail)- .to have_received(:deliver_later)+ .to have_received(:deliver_now)endcontext 'with the notification read in app already' do