-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add the agent-cache-refresher on the explorer backend #170
Conversation
func main() { | ||
app := cli.NewApp() | ||
app.Name = "cache-agent-refresh" | ||
app.Version = fmt.Sprintf("%s, commit '%s', branch '%s'", version, commit, branch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny nit: instead '%s'
you should probably use %q
.
app.Flags = flags | ||
app.Writer = os.Stderr | ||
|
||
app.Action = func(ctx *cli.Context) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would improve the readability if you would extract this whole block as a normal named function.
max_interval_circulation int = 30 // 30 minutes | ||
|
||
// App settings | ||
// metricsPortFlag string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented code left.
return int(math.Floor(float64(current_layer) / float64(leyers_per_epoch))) | ||
} | ||
|
||
func prometheus_metrics_parcer(prometheus_metric_scrape, metric_name, label_value string) float64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo? should that be "parser"?
Description:
Add a small Golang application that contains all the logic needed to trigger the cache refresh.
Motivation: