diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-22 17:32:51 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-22 17:32:51 +0100 |
commit | 45c7ee39b3d45159de382e8596110af04ee1ed8c (patch) | |
tree | 161516b55c190c41c1c2421e0d885960957744f2 /app/services | |
parent | 95db6cbe28acc193ff0c898790a6740c4ff3d473 (diff) |
Remove unneeded indices, improve error handling in background workers, don't needlessly reload reblogged status, send Devise e-mails asynchronously
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/notify_service.rb | 2 | ||||
-rw-r--r-- | app/services/process_feed_service.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb index c0f1d4c53..772adfb90 100644 --- a/app/services/notify_service.rb +++ b/app/services/notify_service.rb @@ -10,6 +10,8 @@ class NotifyService < BaseService create_notification send_email if email_enabled? + rescue ActiveRecord::RecordInvalid + return end private diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb index 8daafd444..1cd801b80 100644 --- a/app/services/process_feed_service.rb +++ b/app/services/process_feed_service.rb @@ -61,7 +61,7 @@ class ProcessFeedService < BaseService status.save! - NotifyService.new.call(status.reblog.account, status) if status.reblog? + NotifyService.new.call(status.reblog.account, status) if status.reblog? && status.reblog.account.local? Rails.logger.debug "Queuing remote status #{status.id} (#{id}) for distribution" DistributionWorker.perform_async(status.id) status |