Lower repository file rewriting timeout from 5 minutes to 30 seconds

Signed-off-by: Patrick Decat <pdecat@gmail.com>
pull/5678/head
Patrick Decat 6 years ago
parent 848d54f451
commit 3f3b5b42f8
No known key found for this signature in database
GPG Key ID: FD55B9BD5687D8FF

@ -137,7 +137,7 @@ func addRepository(name, url, username, password string, home helmpath.Home, cer
// Lock the repository file for concurrent processes synchronization and re-read its content before updating it
fileLock := flock.New(home.RepositoryFile())
lockCtx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
lockCtx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
locked, err := fileLock.TryLockContext(lockCtx, time.Second)
if err == nil && locked {

Loading…
Cancel
Save