Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set interval to 10 sec #442

Merged
merged 3 commits into from
Jul 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/utclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (c *httpClient) Get(ctx context.Context, path string) (*http.Response, erro

// UpdateVisorUptime updates visor uptime.
func (c *httpClient) UpdateVisorUptime(ctx context.Context) error {
resp, err := c.Get(ctx, "/update")
resp, err := c.Get(ctx, "/v2/update")
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/utclient/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func TestUpdateVisorUptime(t *testing.T) {
err = c.UpdateVisorUptime(context.TODO())
require.NoError(t, err)

assert.Equal(t, "/update", <-urlCh)
assert.Equal(t, "/v2/update", <-urlCh)
}

func authHandler(next http.Handler) http.Handler {
Expand Down
7 changes: 2 additions & 5 deletions internal/utclient/mock_api_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions pkg/app/appevent/mock_rpc_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/visor/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ func initHypervisors(v *Visor) bool {
}

func initUptimeTracker(v *Visor) bool {
const tickDuration = time.Second
const tickDuration = 10 * time.Second

report := v.makeReporter("uptime_tracker")
conf := v.conf.UptimeTracker
Expand Down