v1.27.0-a #10
@ -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
|
||||||
|
@ -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()
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
0
~/.lotus-provider/journal/lotus-journal.ndjson
Normal file
0
~/.lotus-provider/journal/lotus-journal.ndjson
Normal file
Loading…
Reference in New Issue
Block a user