Skip to content

Commit

Permalink
arbitrary delay to wait for torrent download
Browse files Browse the repository at this point in the history
  • Loading branch information
avendauz committed Aug 9, 2021
1 parent b6d7804 commit c852bbe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions x/nft/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/zeebo/bencode"
"io/ioutil"
"os"
"time"
)

func NewHandler(keeper keeper.Keeper) sdk.Handler {
Expand Down Expand Up @@ -85,6 +86,7 @@ func handleMsgPublishFile(ctx sdk.Context, k Keeper, msg *types.MsgPublishFile)
var metainfo metainfo.MetaInfo
bencode.DecodeBytes(msg.Metainfo, &metainfo)
k.BtClient.RetrieveFile(&metainfo)
time.Sleep(time.Second * 20)
k.EnsureNftDirExists()
fmt.Println("Creating symlink")
fmt.Println("Linking new file", `k.HomeDir+"/nft/"+msg.Vendor + "-" + msg.Id`)
Expand Down

0 comments on commit c852bbe

Please sign in to comment.