MCPcopy Index your code
hub / github.com/devspace-sh/devspace / execCommandsAfterInitialSync

Method execCommandsAfterInitialSync

pkg/devspace/sync/upstream.go:269–293  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

267}
268
269func (u *upstream) execCommandsAfterInitialSync() (err error) {
270 u.initialSyncCompletedMutex.Lock()
271 defer u.initialSyncCompletedMutex.Unlock()
272
273 // make sure the touch file is there
274 defer func() {
275 if err == nil && u.initialSyncCompleted && (u.sync.Options.RestartContainer || u.sync.Options.StartContainer) {
276 u.initialSyncTouchOnce.Do(func() {
277 if u.sync.Options.Starter != nil {
278 err = u.sync.Options.Starter.Done(u.startContainer)
279 } else {
280 err = u.startContainer()
281 }
282 })
283 }
284 }()
285
286 if !u.initialSyncCompleted || len(u.initialSyncChanges) == 0 {
287 return nil
288 }
289
290 changedFiles := u.initialSyncChanges
291 u.initialSyncChanges = nil
292 return u.execCommands(changedFiles)
293}
294
295func (u *upstream) startContainer() error {
296 _, err := u.client.Execute(u.sync.ctx, &remote.Command{

Callers 1

mainLoopMethod · 0.95

Calls 5

startContainerMethod · 0.95
execCommandsMethod · 0.95
LockMethod · 0.80
UnlockMethod · 0.80
DoneMethod · 0.65

Tested by

no test coverage detected