Skip to content

Commit

Permalink
handle and log errors in reconcile
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstruck committed Jan 28, 2019
1 parent c5592b4 commit 4e4d03f
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 49 deletions.
68 changes: 34 additions & 34 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions cmd/server/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func NewServer(ctx context.Context, conf config.Config, log *logger.Logger) (*Se
compute = events.Noop{}

case "aws-batch":
compute, err = batch.NewBackend(ctx, conf.AWSBatch, reader, writer)
compute, err = batch.NewBackend(ctx, conf.AWSBatch, reader, writer, log.Sub("aws-batch"))
if err != nil {
return nil, err
}
Expand All @@ -212,15 +212,15 @@ func NewServer(ctx context.Context, conf config.Config, log *logger.Logger) (*Se
}

case "gridengine":
compute = gridengine.NewBackend(conf, reader, writer)
compute = gridengine.NewBackend(conf, reader, writer, log.Sub("gridengine"))
case "htcondor":
compute = htcondor.NewBackend(ctx, conf, reader, writer)
compute = htcondor.NewBackend(ctx, conf, reader, writer, log.Sub("htcondor"))
case "noop":
compute = noop.NewBackend()
case "pbs":
compute = pbs.NewBackend(ctx, conf, reader, writer)
compute = pbs.NewBackend(ctx, conf, reader, writer, log.Sub("pbs"))
case "slurm":
compute = slurm.NewBackend(ctx, conf, reader, writer)
compute = slurm.NewBackend(ctx, conf, reader, writer, log.Sub("slurm"))
default:
return nil, fmt.Errorf("unknown compute backend: '%s'", conf.Compute)
}
Expand Down
Loading

0 comments on commit 4e4d03f

Please sign in to comment.