1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

#2049 Fix git_wait_interval - default set to 0 (#2050)

This commit is contained in:
Grzegorz Błaszczyk 2020-03-04 05:24:10 +01:00 committed by GitHub
parent 0741c3498a
commit 92b2e617ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -155,7 +155,7 @@ The following variables are settable:
* Number of concurrent connections to Git repository - useful when your Git server limits the number of simultaneous connections while using SSH (like Gitlab CE). * Number of concurrent connections to Git repository - useful when your Git server limits the number of simultaneous connections while using SSH (like Gitlab CE).
* `:git_wait_interval` * `:git_wait_interval`
* **default:** `3` * **default:** `0`
* Number of seconds to wait after you reach the limit of concurrent connections to Git repository server and disconnect afterwards to initialize new connections. This prevents from being cut out of SSH server when you use `fail2ban` or similar software for limiting connections to server. * Number of seconds to wait after you reach the limit of concurrent connections to Git repository server and disconnect afterwards to initialize new connections. This prevents from being cut out of SSH server when you use `fail2ban` or similar software for limiting connections to server.
Capistrano plugins can provide their own configuration variables. Please refer Capistrano plugins can provide their own configuration variables. Please refer

View file

@ -19,7 +19,7 @@ class Capistrano::SCM::Git < Capistrano::SCM::Plugin
} }
} }
set_if_empty :git_max_concurrent_connections, 10 set_if_empty :git_max_concurrent_connections, 10
set_if_empty :git_wait_interval, 3 set_if_empty :git_wait_interval, 0
end end
def register_hooks def register_hooks

View file

@ -46,7 +46,7 @@ module Capistrano
it "makes git_wait_interval" do it "makes git_wait_interval" do
subject.set_defaults subject.set_defaults
expect(env.fetch(:git_wait_interval)).to eq(3) expect(env.fetch(:git_wait_interval)).to eq(0)
env.set(:git_wait_interval, 5) env.set(:git_wait_interval, 5)
expect(env.fetch(:git_wait_interval)).to eq(5) expect(env.fetch(:git_wait_interval)).to eq(5)
end end