Skip to content

Commit

Permalink
Dependencies update
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Sep 14, 2023
1 parent 3ba32c4 commit 1d0c98a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/essentialkaos/depsy v1.1.0
github.com/essentialkaos/ek/v12 v12.76.0
github.com/essentialkaos/ek/v12 v12.76.1
github.com/essentialkaos/go-linenoise/v3 v3.4.0
github.com/essentialkaos/redy/v4 v4.4.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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.76.0 h1:TDm6q4NFNpiCeozcLigf9V2Z0Pzib7NtPH7F2dsfcmw=
github.com/essentialkaos/ek/v12 v12.76.0/go.mod h1:S9/XSKhEAdylL3PF8GAnUeKKyd92VrDGR4YGacHfz0c=
github.com/essentialkaos/ek/v12 v12.76.1 h1:WwmvjZQtAub2+89tzMHZcJELtIDksDVIXrMFfdg0G1w=
github.com/essentialkaos/ek/v12 v12.76.1/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=
Expand Down
3 changes: 2 additions & 1 deletion sync/master/master.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

"github.com/essentialkaos/ek/v12/fsutil"
"github.com/essentialkaos/ek/v12/httputil"
"github.com/essentialkaos/ek/v12/knf"
"github.com/essentialkaos/ek/v12/log"
"github.com/essentialkaos/ek/v12/mathutil"
"github.com/essentialkaos/ek/v12/netutil"
Expand Down Expand Up @@ -504,7 +505,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, time.Second)
maxSyncWait := CORE.Config.GetD(CORE.REPLICATION_MAX_SYNC_WAIT, knf.Second)
maxInitTimeDur := maxSyncWait * time.Duration(len(fetchResponse.Instances))
deadline := time.Now().Add(maxInitTimeDur)

Expand Down
5 changes: 3 additions & 2 deletions sync/minion/minion.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"time"

"github.com/essentialkaos/ek/v12/fmtutil"
"github.com/essentialkaos/ek/v12/knf"
"github.com/essentialkaos/ek/v12/log"
"github.com/essentialkaos/ek/v12/mathutil"
"github.com/essentialkaos/ek/v12/pluralize"
Expand Down Expand Up @@ -991,15 +992,15 @@ func syncBlocker(id int) {

log.Info("(%3d) Starting sync with master instance…", id)

time.Sleep(CORE.Config.GetD(CORE.REPLICATION_INIT_SYNC_DELAY, time.Second, 3*time.Second))
time.Sleep(CORE.Config.GetD(CORE.REPLICATION_INIT_SYNC_DELAY, knf.Second, 3*time.Second))

syncingWaitLoop(id)
}

// 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, time.Second)
maxWait := CORE.Config.GetD(CORE.REPLICATION_MAX_SYNC_WAIT, knf.Second)
deadline := time.Now().Add(maxWait)

log.Info(
Expand Down

0 comments on commit 1d0c98a

Please sign in to comment.