mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-25 17:48:41 -05:00
Exit after failed connection to Redis
This commit is contained in:
parent
3b6073933e
commit
b4e89cd6cb
2 changed files with 3 additions and 2 deletions
|
|
@ -1657,8 +1657,9 @@ module Vmpooler
|
|||
end
|
||||
end
|
||||
rescue Redis::CannotConnectError => e
|
||||
$logger.log('s', "Cannot connect to the redis server: #{e}")
|
||||
$logger.log('s', "Cannot connect to the redis server, Exiting!!!: #{e}")
|
||||
raise
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3319,7 +3319,7 @@ EOT
|
|||
redis_connection_pool.with do |redis|
|
||||
expect(redis).to receive(:set).with('vmpooler__tasks__clone', 0).and_raise(Redis::CannotConnectError)
|
||||
end
|
||||
expect(logger).to receive(:log).with('s', 'Cannot connect to the redis server: Redis::CannotConnectError')
|
||||
expect(logger).to receive(:log).with('s', 'Cannot connect to the redis server, Exiting!!!: Redis::CannotConnectError')
|
||||
|
||||
expect{subject.execute!(maxloop,0)}.to raise_error Redis::CannotConnectError
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue