environment/exec: Seperate Exec and Wait
This commit is contained in:
parent
2a308ee03c
commit
a590d93e76
14 changed files with 90 additions and 117 deletions
|
|
@ -23,10 +23,7 @@ func (sql *SQL) Snapshot(wisski models.Instance, scontext component.StagingConte
|
|||
|
||||
// SnapshotDB makes a backup of the sql database into dest.
|
||||
func (sql *SQL) SnapshotDB(ctx context.Context, progress io.Writer, dest io.Writer, database string) error {
|
||||
code, err := sql.Stack(sql.Environment).Exec(ctx, stream.NonInteractive(progress), "sql", "mysqldump", "--databases", database)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
code := sql.Stack(sql.Environment).Exec(ctx, stream.NonInteractive(progress), "sql", "mysqldump", "--databases", database)()
|
||||
if code != 0 {
|
||||
return errSQLBackup
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue