Skip to content

Commit

Permalink
feat: change defaultPullConcurrency and defaultPushConcurrency to 5
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi committed Jan 14, 2025
1 parent 7400e79 commit f6f5eb6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var pullCmd = &cobra.Command{
// init initializes pull command.
func init() {
flags := pullCmd.Flags()
flags.IntVar(&pullConfig.Concurrency, "concurrency", pullConfig.Concurrency, "specify the number of concurrent pull operations (default: 3)")
flags.IntVar(&pullConfig.Concurrency, "concurrency", pullConfig.Concurrency, "specify the number of concurrent pull operations")
flags.BoolVar(&pullConfig.PlainHTTP, "plain-http", false, "use plain HTTP instead of HTTPS")
flags.BoolVar(&pullConfig.Insecure, "insecure", false, "use insecure connection for the pull operation and skip TLS verification")
flags.StringVar(&pullConfig.Proxy, "proxy", "", "use proxy for the pull operation")
Expand Down
4 changes: 2 additions & 2 deletions cmd/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/spf13/viper"
)

var pushConfig = config.NewPull()
var pushConfig = config.NewPush()

// pushCmd represents the modctl command for push.
var pushCmd = &cobra.Command{
Expand All @@ -49,7 +49,7 @@ var pushCmd = &cobra.Command{
// init initializes push command.
func init() {
flags := pushCmd.Flags()
flags.IntVar(&pushConfig.Concurrency, "concurrency", pushConfig.Concurrency, "specify the number of concurrent push operations (default: 3)")
flags.IntVar(&pushConfig.Concurrency, "concurrency", pushConfig.Concurrency, "specify the number of concurrent push operations")
flags.BoolVar(&pushConfig.PlainHTTP, "plain-http", false, "use plain HTTP instead of HTTPS")

if err := viper.BindPFlags(flags); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import "fmt"

const (
// defaultPullConcurrency is the default number of concurrent pull operations.
defaultPullConcurrency = 3
defaultPullConcurrency = 5
)

type Pull struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import "fmt"

const (
// defaultPushConcurrency is the default number of concurrent push operations.
defaultPushConcurrency = 3
defaultPushConcurrency = 5
)

type Push struct {
Expand Down

0 comments on commit f6f5eb6

Please sign in to comment.