breaking change: Reduce maximum number of invertes to 5 to keep livedata working
livedata json is now calculated as 4096 * MaxInvertes
This commit is contained in:
parent
3a991708d0
commit
47f81f2579
@ -22,7 +22,7 @@
|
||||
#define MQTT_MAX_CERT_STRLEN 2560
|
||||
|
||||
#define INV_MAX_NAME_STRLEN 31
|
||||
#define INV_MAX_COUNT 10
|
||||
#define INV_MAX_COUNT 5
|
||||
#define INV_MAX_CHAN_COUNT 6
|
||||
|
||||
#define CHAN_MAX_NAME_STRLEN 31
|
||||
|
||||
@ -27,7 +27,7 @@ void WebApiPrometheusClass::loop()
|
||||
void WebApiPrometheusClass::onPrometheusMetricsGet(AsyncWebServerRequest* request)
|
||||
{
|
||||
try {
|
||||
auto stream = request->beginResponseStream("text/plain; charset=utf-8", 40960);
|
||||
auto stream = request->beginResponseStream("text/plain; charset=utf-8", 4096 * INV_MAX_COUNT); // TODO helge: check if this calculation is correct
|
||||
|
||||
stream->print("# HELP opendtu_build Build info\n");
|
||||
stream->print("# TYPE opendtu_build gauge\n");
|
||||
|
||||
@ -69,7 +69,7 @@ void WebApiWsLiveClass::loop()
|
||||
String buffer;
|
||||
// free JsonDocument as soon as possible
|
||||
{
|
||||
DynamicJsonDocument root(40960);
|
||||
DynamicJsonDocument root(4096 * INV_MAX_COUNT); // TODO helge: check if this calculation is correct
|
||||
JsonVariant var = root;
|
||||
generateJsonResponse(var);
|
||||
serializeJson(root, buffer);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user