v1.27.0-a #10

Closed
jonathanface wants to merge 473 commits from v1.27.0-a into master
4 changed files with 10 additions and 5 deletions
Showing only changes of commit 0175faf5c2 - Show all commits

View File

@ -83,8 +83,8 @@ func StorageAuth(apiKey string) (sealer.StorageAuth, error) {
}
func GetDeps(ctx context.Context, cctx *cli.Context) (*Deps, error) {
var deps *Deps
return deps, deps.PopulateRemainingDeps(ctx, cctx, true)
var deps Deps
return &deps, deps.PopulateRemainingDeps(ctx, cctx, true)
}
type Deps struct {
@ -107,6 +107,9 @@ const (
func (deps *Deps) PopulateRemainingDeps(ctx context.Context, cctx *cli.Context, makeRepo bool) error {
if deps == nil {
*deps = Deps{}
}
var err error
if makeRepo {
// Open repo

View File

@ -135,5 +135,6 @@ func ListenAndServe(ctx context.Context, dependencies *deps.Deps, shutdownChan c
log.Warn("Graceful shutdown successful")
}()
log.Infof("Setting up RPC server at %s", dependencies.ListenAddr)
return srv.ListenAndServe()
}

View File

@ -113,11 +113,12 @@ var runCmd = &cli.Command{
}
}
var dependencies *deps.Deps
err = dependencies.PopulateRemainingDeps(ctx, cctx, true)
var deps deps.Deps
err = deps.PopulateRemainingDeps(ctx, cctx, true)
if err != nil {
return err
}
dependencies := &deps
taskEngine, err := tasks.StartTasks(ctx, dependencies)