Skip to content

Commit

Permalink
Merge pull request #94 from AlayaCare/forceSync
Browse files Browse the repository at this point in the history
let's force sync eaxch time we sync
  • Loading branch information
nzin-alayacare authored Oct 31, 2024
2 parents 0f3033b + 03e89a0 commit 9b6a620
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions internal/goliac_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -587,14 +587,11 @@ func (g *GoliacServerImpl) Serve() {
g.syncInterval--
time.Sleep(1 * time.Second)
if g.syncInterval <= 0 {
// we want to sync
// if we just started, let's force sync
// otherwise, let's just sync
if g.lastUnmanaged == nil {
g.triggerApply(true)
} else {
g.triggerApply(false)
}
// we want to forceSync.
// because we want to reconciliate even if there
// is no new commit
// (and also it will populate the lastUnmanaged structure)
g.triggerApply(true)
}
}
}
Expand Down

0 comments on commit 9b6a620

Please sign in to comment.