Skip to content

Commit

Permalink
added ipfs-cluster recover on blox start
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Mar 28, 2024
1 parent 6e75399 commit c6bc125
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions blox/blox.go
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,15 @@ func (p *Blox) Start(ctx context.Context) error {
if err := p.bl.FetchUsersAndPopulateSets(ctx, p.topicName, true, 15*time.Second); err != nil {
log.Errorw("FetchUsersAndPopulateSets failed", "err", err)
}
recoverOut := make(chan api.GlobalPinInfo)
go func() {
err := p.ipfsClusterApi.RecoverAll(ctx, true, recoverOut)
if err != nil {
// Handle error
log.Errorw("RecoverAll error", "err", err.Error())
}
close(recoverOut) // Close the channel when RecoverAll is done
}()

// Create an HTTP server instance
if p.DefaultIPFShttpServer == "fula" {
Expand Down

0 comments on commit c6bc125

Please sign in to comment.