Add context
This commit adds and passes context around to (almost) every function. This allows cancelling (almost) every function call globally.
This commit is contained in:
parent
996ecb9f80
commit
3455f491ca
104 changed files with 836 additions and 511 deletions
|
|
@ -39,13 +39,13 @@ func (sn snapshot) Run(context wisski_distillery.Context) error {
|
|||
dis := context.Environment
|
||||
|
||||
// find the instance!
|
||||
instance, err := dis.Instances().WissKI(sn.Positionals.Slug)
|
||||
instance, err := dis.Instances().WissKI(context.Context, sn.Positionals.Slug)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// do a snapshot of it!
|
||||
err = dis.Exporter().MakeExport(context.IOStream, exporter.ExportTask{
|
||||
err = dis.Exporter().MakeExport(context.Context, context.IOStream, exporter.ExportTask{
|
||||
Dest: sn.Positionals.Dest,
|
||||
StagingOnly: sn.StagingOnly,
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue