Skip to content

Commit a67d5df

Browse files
fix: count tasks requests in client (#550)
1 parent 27800bf commit a67d5df

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

venona/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.3
1+
2.0.4

venona/pkg/agent/agent.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ func (a *Agent) reportTaskStatus(ctx context.Context, taskDef task.Task, err err
262262
}
263263

264264
func (a *Agent) getTasks(ctx context.Context) (task.Tasks, []*workflow.Workflow) {
265-
metrics.IncGetTasksRequests()
266265
tasks := a.pullTasks(ctx)
267266
return a.splitTasks(tasks)
268267
}

venona/pkg/codefresh/codefresh.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"net/url"
2424
"path"
2525

26+
"github.com/codefresh-io/go/venona/pkg/metrics"
2627
"github.com/codefresh-io/go/venona/pkg/task"
2728
)
2829

@@ -80,6 +81,7 @@ func New(opts Options) Codefresh {
8081

8182
// Tasks get from Codefresh all latest tasks
8283
func (c cf) Tasks(ctx context.Context) (task.Tasks, error) {
84+
metrics.IncGetTasksRequests()
8385
query := map[string]string{
8486
"waitForStatusReport": "true",
8587
}

venonactl/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.3
1+
2.0.4

0 commit comments

Comments
 (0)