Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
tweak: set sync-timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jumpeiMano committed Dec 7, 2020
1 parent 64ee50f commit 5953024
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/daemon/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ type changeSet struct {

// Sync starts the synchronization of the cluster with git.
func (d *Daemon) Sync(ctx context.Context, started time.Time, newRevision string, rat ratchet) error {
ctx, cancel := context.WithTimeout(ctx, d.SyncTimeout)
defer cancel()

// Load last-synced resources for comparison
lastResources, err := d.getLastResources(ctx, rat)
if err != nil {
Expand Down

0 comments on commit 5953024

Please sign in to comment.