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) { func GetDeps(ctx context.Context, cctx *cli.Context) (*Deps, error) {
var deps *Deps var deps Deps
return deps, deps.PopulateRemainingDeps(ctx, cctx, true) return &deps, deps.PopulateRemainingDeps(ctx, cctx, true)
} }
type Deps struct { type Deps struct {
@ -107,6 +107,9 @@ const (
func (deps *Deps) PopulateRemainingDeps(ctx context.Context, cctx *cli.Context, makeRepo bool) error { func (deps *Deps) PopulateRemainingDeps(ctx context.Context, cctx *cli.Context, makeRepo bool) error {
if deps == nil {
*deps = Deps{}
}
var err error var err error
if makeRepo { if makeRepo {
// Open repo // Open repo

View File

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

View File

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