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.
This commit is contained in:
parent
ef33a47553
commit
ac80d62c84
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue