diff options
author | Valery Piashchynski <[email protected]> | 2021-07-20 18:02:31 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-07-20 18:02:31 +0300 |
commit | 50cf036c81668508c8f2e9130bc5a2019cddf1b9 (patch) | |
tree | 053ee60a6fb02b5cdbc964fba64f34e1de3d4032 /plugins/jobs/drivers/beanstalk/config.go | |
parent | a149f8345056144f0b62af9b7344fc2628e7fe90 (diff) |
Beanstalk driver alpha version ready.
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/drivers/beanstalk/config.go')
-rw-r--r-- | plugins/jobs/drivers/beanstalk/config.go | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/plugins/jobs/drivers/beanstalk/config.go b/plugins/jobs/drivers/beanstalk/config.go index caa683ab..f05ee122 100644 --- a/plugins/jobs/drivers/beanstalk/config.go +++ b/plugins/jobs/drivers/beanstalk/config.go @@ -17,6 +17,23 @@ func (c *GlobalCfg) InitDefault() { } } -type Config struct{} +type Config struct { + PipePriority int64 `mapstructure:"priority"` + TubePriority uint32 `mapstructure:"tube_priority"` + Tube string `mapstructure:"tube"` + ReserveTimeout time.Duration `mapstructure:"reserve_timeout"` +} + +func (c *Config) InitDefault() { + if c.Tube == "" { + c.Tube = "default" + } -func (c *Config) InitDefault() {} + if c.ReserveTimeout == 0 { + c.ReserveTimeout = time.Second * 5 + } + + if c.PipePriority == 0 { + c.PipePriority = 10 + } +} |