Merge branch 'develop' of git.znuny.com:zammad/zammad into develop
This commit is contained in:
commit
c07faa1f11
1 changed files with 2 additions and 0 deletions
|
@ -12,8 +12,10 @@ class Scheduler < ApplicationModel
|
||||||
Thread.abort_on_exception = true
|
Thread.abort_on_exception = true
|
||||||
|
|
||||||
# reconnect in case db connection is lost
|
# reconnect in case db connection is lost
|
||||||
|
# See issue #1080
|
||||||
begin
|
begin
|
||||||
ActiveRecord::Base.connection.reconnect!
|
ActiveRecord::Base.connection.reconnect!
|
||||||
|
rescue PG::UnableToSend => e # rubocop:disable Lint/HandleExceptions
|
||||||
rescue => e
|
rescue => e
|
||||||
logger.error "Can't reconnect to database #{e.inspect}"
|
logger.error "Can't reconnect to database #{e.inspect}"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue