From 2912cf6f9cd4ec60f9c19aae40f71b1d954f346c Mon Sep 17 00:00:00 2001 From: "Andrew Jackson (Ajax)" Date: Mon, 21 Aug 2023 11:26:26 -0500 Subject: [PATCH] harmonytask review comments --- itests/harmonytask_test.go | 3 ++- lib/harmony/harmonytask/harmonytask.go | 3 ++- lib/harmony/harmonytask/taskTypeHandler.go | 3 ++- lib/harmony/resources/resources.go | 6 ++++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/itests/harmonytask_test.go b/itests/harmonytask_test.go index 2c8523d82..16a282728 100644 --- a/itests/harmonytask_test.go +++ b/itests/harmonytask_test.go @@ -10,12 +10,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/filecoin-project/lotus/itests/kit" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/lib/harmony/harmonytask" "github.com/filecoin-project/lotus/lib/harmony/resources" "github.com/filecoin-project/lotus/node/impl" - "github.com/stretchr/testify/require" ) type task1 struct { diff --git a/lib/harmony/harmonytask/harmonytask.go b/lib/harmony/harmonytask/harmonytask.go index 9f6fe5fd3..0aab9241b 100644 --- a/lib/harmony/harmonytask/harmonytask.go +++ b/lib/harmony/harmonytask/harmonytask.go @@ -9,9 +9,10 @@ import ( "sync/atomic" "time" + "github.com/gorilla/mux" + "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/lib/harmony/resources" - "github.com/gorilla/mux" ) // Consts (except for unit test) diff --git a/lib/harmony/harmonytask/taskTypeHandler.go b/lib/harmony/harmonytask/taskTypeHandler.go index 6693102f2..41e098083 100644 --- a/lib/harmony/harmonytask/taskTypeHandler.go +++ b/lib/harmony/harmonytask/taskTypeHandler.go @@ -9,8 +9,9 @@ import ( "sync/atomic" "time" - "github.com/filecoin-project/lotus/lib/harmony/harmonydb" logging "github.com/ipfs/go-log/v2" + + "github.com/filecoin-project/lotus/lib/harmony/harmonydb" ) var log = logging.Logger("harmonytask") diff --git a/lib/harmony/resources/resources.go b/lib/harmony/resources/resources.go index fb1505af0..918dbea11 100644 --- a/lib/harmony/resources/resources.go +++ b/lib/harmony/resources/resources.go @@ -12,12 +12,14 @@ import ( "time" cl "github.com/Nv7-Github/go-cl" - ffi "github.com/filecoin-project/filecoin-ffi" - "github.com/filecoin-project/lotus/lib/harmony/harmonydb" logging "github.com/ipfs/go-log/v2" "github.com/pbnjay/memory" "github.com/samber/lo" "golang.org/x/sys/unix" + + ffi "github.com/filecoin-project/filecoin-ffi" + + "github.com/filecoin-project/lotus/lib/harmony/harmonydb" ) var LOOKS_DEAD_TIMEOUT = 10 * time.Minute // Time w/o minute heartbeats