summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-08-18 09:15:16 +0300
committerValery Piashchynski <[email protected]>2021-08-18 09:15:16 +0300
commit1d092e57afb55a01283b41942ca3ef15a7e4bdef (patch)
tree3ee6f14d76a2142a39560c090d0329456254bd2b /plugins
parent300560b44451bd9d5241ccdbaea3576760968ef2 (diff)
Update jobs stats tests
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/jobs/drivers/beanstalk/consumer.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/jobs/drivers/beanstalk/consumer.go b/plugins/jobs/drivers/beanstalk/consumer.go
index b4d76d38..6a178dff 100644
--- a/plugins/jobs/drivers/beanstalk/consumer.go
+++ b/plugins/jobs/drivers/beanstalk/consumer.go
@@ -240,14 +240,13 @@ func (j *JobConsumer) State(ctx context.Context) (*jobState.State, error) {
// set stat, skip errors (replace with 0)
// https://github.com/beanstalkd/beanstalkd/blob/master/doc/protocol.txt#L523
if v, err := strconv.Atoi(stat["current-jobs-ready"]); err == nil {
- // this is not an error, ready in terms of beanstalk means reserved in the tube
- out.Reserved = int64(v)
+ out.Active = int64(v)
}
// https://github.com/beanstalkd/beanstalkd/blob/master/doc/protocol.txt#L525
if v, err := strconv.Atoi(stat["current-jobs-reserved"]); err == nil {
// this is not an error, reserved in beanstalk behaves like an active jobs
- out.Active = int64(v)
+ out.Reserved = int64(v)
}
// https://github.com/beanstalkd/beanstalkd/blob/master/doc/protocol.txt#L528