wdcli: Use progress writer instead of IOStream
This commit is contained in:
parent
890022ae64
commit
3b78b06fff
49 changed files with 396 additions and 393 deletions
|
|
@ -39,36 +39,36 @@ func (monday monday) AfterParse() error {
|
|||
func (monday monday) Run(context wisski_distillery.Context) error {
|
||||
if err := logging.LogOperation(func() error {
|
||||
return context.Exec("backup")
|
||||
}, context.IOStream, "Running backup"); err != nil {
|
||||
}, context.Stderr, "Running backup"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := logging.LogOperation(func() error {
|
||||
return context.Exec("system_update", monday.Positionals.GraphdbZip)
|
||||
}, context.IOStream, "Running system_update"); err != nil {
|
||||
}, context.Stderr, "Running system_update"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := logging.LogOperation(func() error {
|
||||
return context.Exec("rebuild")
|
||||
}, context.IOStream, "Running rebuild"); err != nil {
|
||||
}, context.Stderr, "Running rebuild"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := logging.LogOperation(func() error {
|
||||
return context.Exec("update_prefix_config")
|
||||
}, context.IOStream, "Running update_prefix_config"); err != nil {
|
||||
}, context.Stderr, "Running update_prefix_config"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if monday.UpdateInstances {
|
||||
if err := logging.LogOperation(func() error {
|
||||
return context.Exec("blind_update")
|
||||
}, context.IOStream, "Running blind_update"); err != nil {
|
||||
}, context.Stderr, "Running blind_update"); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
logging.LogMessage(context.IOStream, "Done, have a great week!")
|
||||
logging.LogMessage(context.Stderr, "Done, have a great week!")
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue