Commit 87c0c92a authored by Mahmood Ali's avatar Mahmood Ali
Browse files

Pass stats interval colleciton to executor

This fixes a bug where executor based drivers emit stats every second,
regardless of user configuration.

When serializing the Stats request across grpc, the nomad agent dropped
the Interval value, and then executor uses 1s as a default value.
Showing with 3 additions and 1 deletion
+3 -1
......@@ -107,7 +107,9 @@ func (c *grpcExecutorClient) Version() (*ExecutorVersion, error) {
}
func (c *grpcExecutorClient) Stats(ctx context.Context, interval time.Duration) (<-chan *cstructs.TaskResourceUsage, error) {
stream, err := c.client.Stats(ctx, &proto.StatsRequest{})
stream, err := c.client.Stats(ctx, &proto.StatsRequest{
Interval: int64(interval),
})
if err != nil {
return nil, err
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment