mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
lib/promscrape/discovery/openstack: show expiration time for refreshed OpenStack token in seconds - this is easier to interpret by human
This commit is contained in:
parent
cc08648699
commit
90aa2a8ffd
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ func (cfg *apiConfig) getFreshAPICredentials() (*apiCredentials, error) {
|
||||||
return nil, fmt.Errorf("cannot refresh OpenStack api token: %w", err)
|
return nil, fmt.Errorf("cannot refresh OpenStack api token: %w", err)
|
||||||
}
|
}
|
||||||
cfg.creds = newCreds
|
cfg.creds = newCreds
|
||||||
logger.Infof("successfully refreshed OpenStack api token; next expiration: %s", newCreds.expiration)
|
logger.Infof("successfully refreshed OpenStack api token; expiration: %.3f seconds", time.Until(newCreds.expiration).Seconds())
|
||||||
return newCreds, nil
|
return newCreds, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue