Fix race condition in create endpoint
This commit is contained in:
parent
779d9ba95a
commit
f3f50b0ace
@ -231,6 +231,11 @@ func (p *Processor) Create(appTemplate apps.App) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = container.Start()
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to start container: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
// Wait for the app to be created
|
// Wait for the app to be created
|
||||||
err = p.waitForApp()
|
err = p.waitForApp()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -275,8 +280,7 @@ func (p *Processor) Create(appTemplate apps.App) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err = container.Start()
|
return nil
|
||||||
return fmt.Errorf("failed to start container: %v", err)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register registers app without creating a container for it
|
// Register registers app without creating a container for it
|
||||||
|
Loading…
Reference in New Issue
Block a user