moved spray timeout to config

This commit is contained in:
2021-11-09 18:59:00 +01:00
parent 0fdea7b327
commit 1d6396abfd
5 changed files with 42 additions and 36 deletions

View File

@@ -25,16 +25,17 @@ const (
)
type DemoMatchLoaderConfig struct {
Username string
Password string
AuthCode string
Sentry string
LoginKey string
Db *ent.Client
Worker int
ApiKey string
RateLimit ratelimit.Limiter
Cache *cache.Cache
Username string
Password string
AuthCode string
Sentry string
LoginKey string
Db *ent.Client
Worker int
ApiKey string
RateLimit ratelimit.Limiter
Cache *cache.Cache
SprayTimeout int
}
type DemoMatchLoader struct {
@@ -160,7 +161,7 @@ func (d *DemoMatchLoader) Setup(config *DemoMatchLoaderConfig) error {
d.parseMap = map[string]bool{}
d.parseMapL = new(sync.Mutex)
d.cache = config.Cache
err := d.dp.Setup(config.Db, config.Worker)
err := d.dp.Setup(config.Db, config.Worker, config.SprayTimeout)
if err != nil {
return err
}