This commit is contained in:
Shrenuj Bansal
2023-08-30 12:40:54 -04:00
parent 5562c7cd79
commit 9cc5e84677
4 changed files with 742 additions and 9 deletions
+7 -9
View File
@@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"github.com/filecoin-project/lotus/lib/harmony/harmonydb"
"github.com/filecoin-project/lotus/lib/harmony/harmonytask"
"net/http"
"os"
"path/filepath"
@@ -323,17 +322,16 @@ func WindowPostScheduler(fc config.MinerFeeConfig, pc config.ProvingConfig) func
return nil, err
}
wdPostTask := wdpost.NewWdPostTask(db)
tasks := []harmonytask.TaskInterface{wdPostTask}
taskEngine, err := harmonytask.New(db, []harmonytask.TaskInterface{wdPostTask}, "localhost:12300")
if err != nil {
return nil, xerrors.Errorf("failed to create task engine: %w", err)
}
//wdPostTask := wdpost.NewWdPostTask(db)
//
//taskEngine, err := harmonytask.New(db, []harmonytask.TaskInterface{wdPostTask}, "localhost:12300")
//if err != nil {
// return nil, xerrors.Errorf("failed to create task engine: %w", err)
//}
//handler := gin.New()
//
//taskEngine.ApplyHttpHandlers(handler.Group("/"))
defer taskEngine.GracefullyTerminate(time.Hour)
//defer taskEngine.GracefullyTerminate(time.Hour)
lc.Append(fx.Hook{
OnStart: func(context.Context) error {