mirror of https://github.com/harness/drone.git
fix: [CDE-416]: Increasing timeout to 10m for all gitspace events. (#2861)
* fix: [CDE-416]: Increasing timeout to 10m for all gitspace events.pull/3576/head
parent
8c5e7546c3
commit
3668c43a2a
|
@ -32,6 +32,7 @@ type Config struct {
|
|||
EventReaderName string
|
||||
Concurrency int
|
||||
MaxRetries int
|
||||
TimeoutInMins int
|
||||
}
|
||||
|
||||
func (c *Config) Sanitize() error {
|
||||
|
@ -71,7 +72,7 @@ func NewService(
|
|||
|
||||
_, err := gitspaceEventReaderFactory.Launch(ctx, groupGitspaceEvents, config.EventReaderName,
|
||||
func(r *gitspaceevents.Reader) error {
|
||||
const idleTimeout = 1 * time.Minute
|
||||
var idleTimeout = time.Duration(config.TimeoutInMins) * time.Minute
|
||||
r.Configure(
|
||||
stream.WithConcurrency(config.Concurrency),
|
||||
stream.WithHandlerOptions(
|
||||
|
|
|
@ -57,7 +57,7 @@ func NewService(
|
|||
|
||||
_, err := gitspaceInfraEventReaderFactory.Launch(ctx, groupGitspaceInfraEvents, config.EventReaderName,
|
||||
func(r *gitspaceinfraevents.Reader) error {
|
||||
const idleTimeout = 1 * time.Minute
|
||||
var idleTimeout = time.Duration(config.TimeoutInMins) * time.Minute
|
||||
r.Configure(
|
||||
stream.WithConcurrency(config.Concurrency),
|
||||
stream.WithHandlerOptions(
|
||||
|
|
|
@ -463,5 +463,6 @@ func ProvideGitspaceEventConfig(config *types.Config) *gitspaceevent.Config {
|
|||
EventReaderName: config.InstanceID,
|
||||
Concurrency: config.Gitspace.Events.Concurrency,
|
||||
MaxRetries: config.Gitspace.Events.MaxRetries,
|
||||
TimeoutInMins: config.Gitspace.Events.TimeoutInMins,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -424,8 +424,9 @@ type Config struct {
|
|||
AgentPort int `envconfig:"GITNESS_GITSPACE_AGENT_PORT" default:"8083"`
|
||||
|
||||
Events struct {
|
||||
Concurrency int `envconfig:"GITNESS_GITSPACE_EVENTS_CONCURRENCY" default:"4"`
|
||||
MaxRetries int `envconfig:"GITNESS_GITSPACE_EVENTS_MAX_RETRIES" default:"3"`
|
||||
Concurrency int `envconfig:"GITNESS_GITSPACE_EVENTS_CONCURRENCY" default:"4"`
|
||||
MaxRetries int `envconfig:"GITNESS_GITSPACE_EVENTS_MAX_RETRIES" default:"3"`
|
||||
TimeoutInMins int `envconfig:"GITNESS_GITSPACE_EVENTS_TIMEOUT_IN_MINS" default:"10"`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue