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>
This commit is contained in:
parent
d1e424bd5c
commit
e364a852af
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue