diff --git a/go.mod b/go.mod index c0ff9c6..e3d3d68 100644 --- a/go.mod +++ b/go.mod @@ -4,12 +4,12 @@ go 1.20 require ( github.com/essentialkaos/depsy v1.1.0 - github.com/essentialkaos/ek/v12 v12.75.1 + github.com/essentialkaos/ek/v12 v12.76.0 github.com/essentialkaos/go-linenoise/v3 v3.4.0 github.com/essentialkaos/redy/v4 v4.4.0 ) require ( - golang.org/x/crypto v0.12.0 // indirect - golang.org/x/sys v0.11.0 // indirect + golang.org/x/crypto v0.13.0 // indirect + golang.org/x/sys v0.12.0 // indirect ) diff --git a/go.sum b/go.sum index 1ee01f4..d0ff026 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,8 @@ github.com/essentialkaos/check v1.4.0 h1:kWdFxu9odCxUqo1NNFNJmguGrDHgwi3A8daXX1nkuKk= github.com/essentialkaos/depsy v1.1.0 h1:U6dp687UkQwXlZU17Hg2KMxbp3nfZAoZ8duaeUFYvJI= github.com/essentialkaos/depsy v1.1.0/go.mod h1:kpiTAV17dyByVnrbNaMcZt2jRwvuXClUYOzpyJQwtG8= -github.com/essentialkaos/ek/v12 v12.75.1 h1:HE8/uWED+QgyT6HIcRULqjMYWKhqQ1rkfa/ozcva1eQ= -github.com/essentialkaos/ek/v12 v12.75.1/go.mod h1:juDcZWOWaj1QmYShZkT9RzdqJ3n0tmeP/iq4sw5fQF0= +github.com/essentialkaos/ek/v12 v12.76.0 h1:TDm6q4NFNpiCeozcLigf9V2Z0Pzib7NtPH7F2dsfcmw= +github.com/essentialkaos/ek/v12 v12.76.0/go.mod h1:S9/XSKhEAdylL3PF8GAnUeKKyd92VrDGR4YGacHfz0c= github.com/essentialkaos/go-linenoise/v3 v3.4.0 h1:g72w8x+/HIwOMBVvNaPYp+wMWVHrYZwzFAF7OfZR5Ts= github.com/essentialkaos/go-linenoise/v3 v3.4.0/go.mod h1:t1kNLY2bSMQCy1JXOefD2BDLs/TTPMtTv3DFNV5uDSI= github.com/essentialkaos/redy/v4 v4.4.0 h1:6r6AkZiDkFWPqnvl0M+u7mcaaWQaeeiZOoLqLAMcnzQ= @@ -10,7 +10,7 @@ github.com/essentialkaos/redy/v4 v4.4.0/go.mod h1:0TUOQZGzhRmZD13sCVUtYUYCa3Xd8v github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/sync/master/master.go b/sync/master/master.go index cbbde92..f815b62 100644 --- a/sync/master/master.go +++ b/sync/master/master.go @@ -504,7 +504,7 @@ func fetchHandler(w http.ResponseWriter, r *http.Request) { log.Error("Can't encode response: %v", err) } - maxSyncWait := CORE.Config.GetD(CORE.REPLICATION_MAX_SYNC_WAIT) + maxSyncWait := CORE.Config.GetD(CORE.REPLICATION_MAX_SYNC_WAIT, time.Second) maxInitTimeDur := maxSyncWait * time.Duration(len(fetchResponse.Instances)) deadline := time.Now().Add(maxInitTimeDur) diff --git a/sync/minion/minion.go b/sync/minion/minion.go index 3583282..6befda8 100644 --- a/sync/minion/minion.go +++ b/sync/minion/minion.go @@ -991,7 +991,7 @@ func syncBlocker(id int) { log.Info("(%3d) Starting sync with master instance…", id) - time.Sleep(CORE.Config.GetD(CORE.REPLICATION_INIT_SYNC_DELAY, 3*time.Second)) + time.Sleep(CORE.Config.GetD(CORE.REPLICATION_INIT_SYNC_DELAY, time.Second, 3*time.Second)) syncingWaitLoop(id) } @@ -999,7 +999,7 @@ func syncBlocker(id int) { // syncingWaitLoop blocks main sync process till syncing will be completed func syncingWaitLoop(id int) { start := time.Now().Unix() - maxWait := CORE.Config.GetD(CORE.REPLICATION_MAX_SYNC_WAIT) + maxWait := CORE.Config.GetD(CORE.REPLICATION_MAX_SYNC_WAIT, time.Second) deadline := time.Now().Add(maxWait) log.Info(