refactor: move `min_block_size` one level up
This commit is contained in:
parent
9a1d3ea04f
commit
4859cebd9f
|
@ -120,6 +120,16 @@ fields(aggreg_parameters) ->
|
||||||
desc => ?DESC("aggregated_blob_template"),
|
desc => ?DESC("aggregated_blob_template"),
|
||||||
required => true
|
required => true
|
||||||
}
|
}
|
||||||
|
)},
|
||||||
|
{min_block_size,
|
||||||
|
mk(
|
||||||
|
emqx_schema:bytesize(),
|
||||||
|
#{
|
||||||
|
default => <<"10mb">>,
|
||||||
|
importance => ?IMPORTANCE_HIDDEN,
|
||||||
|
required => true,
|
||||||
|
validator => fun block_size_validator/1
|
||||||
|
}
|
||||||
)}
|
)}
|
||||||
| fields(common_action_parameters)
|
| fields(common_action_parameters)
|
||||||
];
|
];
|
||||||
|
@ -144,16 +154,6 @@ fields(aggregation) ->
|
||||||
default => 1_000_000,
|
default => 1_000_000,
|
||||||
desc => ?DESC("aggregation_max_records")
|
desc => ?DESC("aggregation_max_records")
|
||||||
}
|
}
|
||||||
)},
|
|
||||||
{min_block_size,
|
|
||||||
mk(
|
|
||||||
emqx_schema:bytesize(),
|
|
||||||
#{
|
|
||||||
default => <<"10mb">>,
|
|
||||||
importance => ?IMPORTANCE_HIDDEN,
|
|
||||||
required => true,
|
|
||||||
validator => fun block_size_validator/1
|
|
||||||
}
|
|
||||||
)}
|
)}
|
||||||
];
|
];
|
||||||
fields(common_action_parameters) ->
|
fields(common_action_parameters) ->
|
||||||
|
|
|
@ -526,12 +526,12 @@ install_action(#{parameters := #{mode := aggregated}} = ActionConfig, ConnState)
|
||||||
aggregation := #{
|
aggregation := #{
|
||||||
container := ContainerOpts,
|
container := ContainerOpts,
|
||||||
max_records := MaxRecords,
|
max_records := MaxRecords,
|
||||||
min_block_size := MinBlockSize,
|
|
||||||
time_interval := TimeInterval
|
time_interval := TimeInterval
|
||||||
},
|
},
|
||||||
container := ContainerName,
|
container := ContainerName,
|
||||||
blob := BlobTemplateStr,
|
blob := BlobTemplateStr,
|
||||||
max_block_size := MaxBlockSize
|
max_block_size := MaxBlockSize,
|
||||||
|
min_block_size := MinBlockSize
|
||||||
}
|
}
|
||||||
} = ActionConfig,
|
} = ActionConfig,
|
||||||
Type = ?ACTION_TYPE_BIN,
|
Type = ?ACTION_TYPE_BIN,
|
||||||
|
|
|
@ -615,11 +615,9 @@ t_aggreg_pending_upload_restart(Config) ->
|
||||||
#{
|
#{
|
||||||
<<"parameters">> =>
|
<<"parameters">> =>
|
||||||
#{
|
#{
|
||||||
<<"aggregation">> => #{
|
|
||||||
<<"min_block_size">> => <<"1024B">>
|
<<"min_block_size">> => <<"1024B">>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
{ok, _Rule} =
|
{ok, _Rule} =
|
||||||
|
|
Loading…
Reference in New Issue