Skip to content

Commit

Permalink
job,run: Move Input and Output structs to run namespace
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Jung <a.jung@lancs.ac.uk>
  • Loading branch information
nderjung committed Dec 29, 2020
1 parent 354e466 commit b2789d5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
3 changes: 1 addition & 2 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ import (
"os/signal"

"github.com/spf13/cobra"
"github.com/lancs-net/ukbench/log"

"github.com/lancs-net/ukbench/log"
"github.com/lancs-net/ukbench/job"
"github.com/lancs-net/ukbench/run"
)

type RunConfig struct {
Expand Down
19 changes: 5 additions & 14 deletions job/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import (

"gopkg.in/yaml.v2"
"github.com/lancs-net/ukbench/log"
"github.com/lancs-net/ukbench/run"
)

type JobParam struct {
Expand All @@ -54,16 +55,6 @@ type JobParam struct {
StepMode string `yaml:"step_mode"`
}

type Input struct {
Name string `yaml:"name"`
Path string `yaml:"path"`
}

type Output struct {
Name string `yaml:"name"`
Path string `yaml:"path"`
}

type Run struct {
Name string `yaml:"name"`
Image string `yaml:"image"`
Expand All @@ -75,10 +66,10 @@ type Run struct {
}

type Job struct {
Params []JobParam `yaml:"params"`
Inputs []Input `yaml:"inputs"`
Outputs []Output `yaml:"outputs"`
Runs []Run `yaml:"runs"`
Params []JobParam `yaml:"params"`
Inputs []run.Input `yaml:"inputs"`
Outputs []run.Output `yaml:"outputs"`
Runs []Run `yaml:"runs"`
waitList *List
scheduleGrace int
}
Expand Down
4 changes: 2 additions & 2 deletions job/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ type TaskParam struct {
// Task is the specific iterated configuration
type Task struct {
Params []TaskParam
Inputs *[]Input
Outputs *[]Output
Inputs *[]run.Input
Outputs *[]run.Output
runs *Queue
uuid string
workDir string
Expand Down
10 changes: 10 additions & 0 deletions run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ const (
RUNC
)

type Input struct {
Name string `yaml:"name"`
Path string `yaml:"path"`
}

type Output struct {
Name string `yaml:"name"`
Path string `yaml:"path"`
}

type RunnerConfig struct {
Log *log.Logger
WorkDir string
Expand Down

0 comments on commit b2789d5

Please sign in to comment.