mirror of https://github.com/databricks/cli.git
Log initial sync complete (#86)
Tested manually <img width="930" alt="Screenshot 2022-10-27 at 2 21 52 PM" src="https://user-images.githubusercontent.com/88374338/198282897-ad0c3d62-be92-4ec4-a0e1-4df2a7eab2b9.png">
This commit is contained in:
parent
18dae73505
commit
1329bc05d4
|
@ -134,6 +134,7 @@ func (w *watchdog) main(ctx context.Context, applyDiff func(diff) error, remoteP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prj := project.Get(ctx)
|
prj := project.Get(ctx)
|
||||||
|
var onlyOnceInitLog sync.Once
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
|
@ -147,6 +148,9 @@ func (w *watchdog) main(ctx context.Context, applyDiff func(diff) error, remoteP
|
||||||
}
|
}
|
||||||
change := snapshot.diff(all)
|
change := snapshot.diff(all)
|
||||||
if change.IsEmpty() {
|
if change.IsEmpty() {
|
||||||
|
onlyOnceInitLog.Do(func() {
|
||||||
|
log.Printf("[INFO] Initial Sync Complete")
|
||||||
|
})
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
log.Printf("[INFO] Action: %v", change)
|
log.Printf("[INFO] Action: %v", change)
|
||||||
|
@ -163,6 +167,9 @@ func (w *watchdog) main(ctx context.Context, applyDiff func(diff) error, remoteP
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
onlyOnceInitLog.Do(func() {
|
||||||
|
log.Printf("[INFO] Initial Sync Complete")
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue