diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2014-06-22 14:48:31 +0200 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2014-06-22 14:48:31 +0200 |
commit | e364a852afde6a1897221b5c17c2a4be56a40b43 (patch) | |
tree | 100c648b9936a2c0ea9e43d849ce27bad2ac1f59 /app | |
parent | d1e424bd5c403d73d399bf0f92e39aefde56e638 (diff) | |
download | gitlab-ce-e364a852afde6a1897221b5c17c2a4be56a40b43.tar.gz |
Call every service, even if one fails
When one service fails, we dont want to have all of them failing. This
fixes this problem by catching all the errors, and writing them to the
error log.
Fixes: #5803
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 762b540b7a3..770558f5ba1 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -391,7 +391,11 @@ class Project < ActiveRecord::Base services.each do |service| # Call service hook only if it is active - service.execute(data) if service.active + begin + service.execute(data) if service.active + rescue => e + logger.error(e) + end end end |