fix: curio: Update pgx imports, fix db_storage alloc
This commit is contained in:
parent
914a65cea6
commit
1b6bffd339
@ -14,8 +14,8 @@ import (
|
||||
|
||||
"github.com/google/uuid"
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
"github.com/jackc/pgx/v5"
|
||||
manet "github.com/multiformats/go-multiaddr/net"
|
||||
"github.com/yugabyte/pgx/v5"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/filecoin-project/go-address"
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/yugabyte/pgx/v5"
|
||||
|
||||
"github.com/filecoin-project/lotus/lib/harmony/harmonydb"
|
||||
"github.com/filecoin-project/lotus/lib/passcall"
|
||||
|
@ -723,7 +723,7 @@ func (dbi *DBIndex) StorageBestAlloc(ctx context.Context, allocate storiface.Sec
|
||||
FROM storage_path
|
||||
WHERE available >= $1
|
||||
and NOW()-($2 * INTERVAL '1 second') < last_heartbeat
|
||||
and heartbeat_err = ''
|
||||
and heartbeat_err IS NULL
|
||||
and (($3 and can_seal = TRUE) or ($4 and can_store = TRUE))
|
||||
order by (available::numeric * weight) desc`,
|
||||
spaceReq,
|
||||
|
Loading…
Reference in New Issue
Block a user