env: Move each component into a separate struct
This commit cleans up the distillery code by making each component a distinct struct. Each of these components is also returned by by a new Component() function that replaces the Stacks() function.
This commit is contained in:
parent
2a14d93d3c
commit
09431c4869
16 changed files with 265 additions and 148 deletions
|
|
@ -156,7 +156,7 @@ func (bi backupInstance) makeSnapshot(context wisski_distillery.Context, path st
|
|||
defer nquads.Close()
|
||||
|
||||
// TODO: Add a progress bar?
|
||||
_, err = dis.TriplestoreBackup(nquads, instance.GraphDBRepository)
|
||||
_, err = dis.Triplestore().Backup(nquads, instance.GraphDBRepository)
|
||||
return err
|
||||
}, context.IOStream, "Backing up Triplestore"); err != nil {
|
||||
return errBackupFailed.Wrap(err)
|
||||
|
|
@ -175,7 +175,7 @@ func (bi backupInstance) makeSnapshot(context wisski_distillery.Context, path st
|
|||
defer sql.Close()
|
||||
|
||||
// TODO: Add a progress bar?
|
||||
return dis.SQLBackup(context.IOStream, sql, instance.SqlDatabase)
|
||||
return dis.SQL().Backup(context.IOStream, sql, instance.SqlDatabase)
|
||||
}, context.IOStream, "Backing up Triplestore"); err != nil {
|
||||
return errBackupFailed.Wrap(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue