mirror of
https://github.com/zrepl/zrepl.git
synced 2025-08-10 07:27:34 +02:00
WIP: Switch to new config format.
Don't use jobrun for daemon, just call JobDo() once, the job must organize stuff itself. Sacrifice all the oneshot commands, they will be reintroduced as client-calls to the daemon.
This commit is contained in:
23
cmd/test.go
23
cmd/test.go
@ -47,24 +47,21 @@ func doTestDatasetMapFilter(cmd *cobra.Command, args []string) {
|
||||
os.Exit(1)
|
||||
}
|
||||
n, i := args[0], args[1]
|
||||
jobi, err := conf.resolveJobName(n)
|
||||
if err != nil {
|
||||
log.Printf("%s", err)
|
||||
|
||||
jobi, ok := conf.Jobs[n]
|
||||
if !ok {
|
||||
log.Printf("no job %s defined in config")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
var mf DatasetMapFilter
|
||||
var mf *DatasetMapFilter
|
||||
switch j := jobi.(type) {
|
||||
case *Autosnap:
|
||||
mf = j.DatasetFilter
|
||||
case *Prune:
|
||||
mf = j.DatasetFilter
|
||||
case *Pull:
|
||||
case *PullJob:
|
||||
mf = j.Mapping
|
||||
case *SourceJob:
|
||||
mf = j.Datasets
|
||||
case *LocalJob:
|
||||
mf = j.Mapping
|
||||
case *Push:
|
||||
mf = j.Filter
|
||||
case DatasetMapFilter:
|
||||
mf = j
|
||||
default:
|
||||
panic("incomplete implementation")
|
||||
}
|
||||
|
Reference in New Issue
Block a user