mics changes

dev
LuitelSamikshya 2022-10-13 09:30:25 -05:00
parent 90e7cbdcd2
commit 944d24a252
2 changed files with 3 additions and 3 deletions

View File

@ -242,9 +242,9 @@ func New(options *types.Options) (*Runner, error) {
}
if options.RateLimitMinute > 0 {
runner.ratelimiter = ratelimit.New(context.Background(), int64(options.RateLimitMinute), time.Minute)
runner.ratelimiter = ratelimit.New(context.Background(), options.RateLimitMinute, time.Minute)
} else if options.RateLimit > 0 {
runner.ratelimiter = ratelimit.New(context.Background(), int64(options.RateLimit), time.Second)
runner.ratelimiter = ratelimit.New(context.Background(), options.RateLimit, time.Second)
} else {
runner.ratelimiter = ratelimit.NewUnlimited(context.Background())
}

View File

@ -89,7 +89,7 @@ func NewMockExecuterOptions(options *types.Options, info *TemplateInfo) *protoco
IssuesClient: nil,
Browser: nil,
Catalog: disk.NewCatalog(options.TemplatesDirectory),
RateLimiter: ratelimit.New(context.Background(), int64(options.RateLimit), time.Second),
RateLimiter: ratelimit.New(context.Background(), options.RateLimit, time.Second),
}
return executerOpts
}