Skip to content

Commit

Permalink
point ipfs to pinner that syncs on every pin (#8231)
Browse files Browse the repository at this point in the history
Pinner upgrades and fixes. Faster reindexing. Syncing while reindexing. Syncing on every pin operation. Logging all pin operations.

Co-authored-by: gammazero <gammazero@users.noreply.github.com>
  • Loading branch information
petar and gammazero committed Jul 29, 2021
1 parent eda8b43 commit cab67f6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 5 additions & 7 deletions core/node/core.go
Expand Up @@ -3,19 +3,18 @@ package node
import (
"context"
"fmt"
"time"

"github.com/ipfs/go-bitswap"
"github.com/ipfs/go-bitswap/network"
"github.com/ipfs/go-blockservice"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-datastore"
"github.com/ipfs/go-filestore"
"github.com/ipfs/go-ipfs-blockstore"
"github.com/ipfs/go-ipfs-exchange-interface"
"github.com/ipfs/go-ipfs-pinner"
blockstore "github.com/ipfs/go-ipfs-blockstore"
exchange "github.com/ipfs/go-ipfs-exchange-interface"
pin "github.com/ipfs/go-ipfs-pinner"
"github.com/ipfs/go-ipfs-pinner/dspinner"
"github.com/ipfs/go-ipld-format"
format "github.com/ipfs/go-ipld-format"
"github.com/ipfs/go-merkledag"
"github.com/ipfs/go-mfs"
"github.com/ipfs/go-unixfs"
Expand Down Expand Up @@ -52,8 +51,7 @@ func Pinning(bstore blockstore.Blockstore, ds format.DAGService, repo repo.Repo)
}
syncDs := &syncDagService{ds, syncFn}

ctx, cancel := context.WithTimeout(context.TODO(), 2*time.Minute)
defer cancel()
ctx := context.TODO()

pinning, err := dspinner.New(ctx, rootDS, syncDs)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -34,7 +34,7 @@ require (
github.com/ipfs/go-ipfs-exchange-offline v0.0.1
github.com/ipfs/go-ipfs-files v0.0.8
github.com/ipfs/go-ipfs-keystore v0.0.2
github.com/ipfs/go-ipfs-pinner v0.1.1
github.com/ipfs/go-ipfs-pinner v0.1.2
github.com/ipfs/go-ipfs-posinfo v0.0.1
github.com/ipfs/go-ipfs-provider v0.5.1
github.com/ipfs/go-ipfs-routing v0.1.0
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Expand Up @@ -435,8 +435,10 @@ github.com/ipfs/go-ipfs-files v0.0.8 h1:8o0oFJkJ8UkO/ABl8T6ac6tKF3+NIpj67aAB6Zpu
github.com/ipfs/go-ipfs-files v0.0.8/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs=
github.com/ipfs/go-ipfs-keystore v0.0.2 h1:Fa9xg9IFD1VbiZtrNLzsD0GuELVHUFXCWF64kCPfEXU=
github.com/ipfs/go-ipfs-keystore v0.0.2/go.mod h1:H49tRmibOEs7gLMgbOsjC4dqh1u5e0R/SWuc2ScfgSo=
github.com/ipfs/go-ipfs-pinner v0.1.1 h1:iJd1gwILGQJSZhhI0jn6yFOLg34Ua7fdKcB6mXp6k/M=
github.com/ipfs/go-ipfs-pinner v0.1.1/go.mod h1:EzyyaWCWeZJ/he9cDBH6QrEkSuRqTRWMmCoyNkylTTg=
github.com/ipfs/go-ipfs-pinner v0.1.2-0.20210728161430-a223f5b32749 h1:t92ibx9OyuUwFgvb0squZP29iMf2H3YyMn0QMSQe1RY=
github.com/ipfs/go-ipfs-pinner v0.1.2-0.20210728161430-a223f5b32749/go.mod h1:/u9kMe+TyQybN21O5OBicdyx3x93lVI77PCtiTnArUk=
github.com/ipfs/go-ipfs-pinner v0.1.2 h1:Ve9OBhL6eg5+tVqEnIhPZOCXDtMjB+OhOohVZxPUxms=
github.com/ipfs/go-ipfs-pinner v0.1.2/go.mod h1:/u9kMe+TyQybN21O5OBicdyx3x93lVI77PCtiTnArUk=
github.com/ipfs/go-ipfs-posinfo v0.0.1 h1:Esoxj+1JgSjX0+ylc0hUmJCOv6V2vFoZiETLR6OtpRs=
github.com/ipfs/go-ipfs-posinfo v0.0.1/go.mod h1:SwyeVP+jCwiDu0C313l/8jg6ZxM0qqtlt2a0vILTc1A=
github.com/ipfs/go-ipfs-pq v0.0.1/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY=
Expand Down

0 comments on commit cab67f6

Please sign in to comment.