Skip to content

Commit

Permalink
make it configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
anjor committed Dec 13, 2022
1 parent 30cea4c commit 905d6af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/estuary.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func NewEstuary(appVersion string) *Estuary {
DisableFilecoinStorage: false,
DisableSwaggerEndpoint: false,
DisableAutoRetrieve: true,
RateLimit: rate.Limit(20),

Deal: Deal{
IsDisabled: false,
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"errors"
"flag"
"fmt"
"golang.org/x/time/rate"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -223,6 +224,9 @@ func overrideSetOptions(flags []cli.Flag, cctx *cli.Context, cfg *config.Estuary
}
cfg.Deal.MaxVerifiedPrice = abi.TokenAmount(maxVerifiedPrice)

case "rate-limit":
cfg.RateLimit = rate.Limit(cctx.Float64("rate-limit"))

default:
}
}
Expand Down

0 comments on commit 905d6af

Please sign in to comment.