system_update: Perform provisioning in parallel

This commit is contained in:
Tom Wiesing 2022-09-22 18:06:46 +02:00
parent c091761762
commit 72d95f58ea
No known key found for this signature in database
15 changed files with 182 additions and 27 deletions

View file

@ -21,10 +21,10 @@ func (sql *SQL) Shell(io stream.IOStream, argv ...string) (int, error) {
// unsafeWaitShell waits for a connection via the database shell to succeed
func (sql *SQL) unsafeWaitShell() error {
n := stream.FromNil()
n := stream.FromDebug()
return wait.Wait(func() bool {
code, err := sql.Shell(n, "-e", "select 1;")
// log.Printf("[unsafeWaitShell] %d %s\n", code, err) // debug
n.EPrintf("[SQL.unsafeWaitShell]: %d %s\n", code, err)
return err == nil && code == 0
}, sql.PollInterval, sql.PollContext)
}