未验证 提交 d7d38d88 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

Hotfix/sangshuduo/td 4353 taosdemo subscribe resub for develop (#6303)

* [TD-4353]<fix>: taosdemo resub if resubAfterConsume != -1

* fix but resubafter use endafter section.
Co-authored-by: NShuduo Sang <sdsang@taosdata.com>
上级 61fc1814
...@@ -4401,8 +4401,9 @@ static bool getMetaFromQueryJsonFile(cJSON* root) { ...@@ -4401,8 +4401,9 @@ static bool getMetaFromQueryJsonFile(cJSON* root) {
cJSON* resubAfterConsume = cJSON* resubAfterConsume =
cJSON_GetObjectItem(specifiedQuery, "resubAfterConsume"); cJSON_GetObjectItem(specifiedQuery, "resubAfterConsume");
if (resubAfterConsume if ((resubAfterConsume)
&& resubAfterConsume->type == cJSON_Number) { && (resubAfterConsume->type == cJSON_Number)
&& (resubAfterConsume->valueint >= 0)) {
g_queryInfo.specifiedQueryInfo.resubAfterConsume[j] g_queryInfo.specifiedQueryInfo.resubAfterConsume[j]
= resubAfterConsume->valueint; = resubAfterConsume->valueint;
} else if (!resubAfterConsume) { } else if (!resubAfterConsume) {
...@@ -4563,14 +4564,15 @@ static bool getMetaFromQueryJsonFile(cJSON* root) { ...@@ -4563,14 +4564,15 @@ static bool getMetaFromQueryJsonFile(cJSON* root) {
} }
cJSON* superResubAfterConsume = cJSON* superResubAfterConsume =
cJSON_GetObjectItem(superQuery, "endAfterConsume"); cJSON_GetObjectItem(superQuery, "resubAfterConsume");
if (superResubAfterConsume if ((superResubAfterConsume)
&& superResubAfterConsume->type == cJSON_Number) { && (superResubAfterConsume->type == cJSON_Number)
g_queryInfo.superQueryInfo.endAfterConsume = && (superResubAfterConsume->valueint >= 0)) {
g_queryInfo.superQueryInfo.resubAfterConsume =
superResubAfterConsume->valueint; superResubAfterConsume->valueint;
} else if (!superResubAfterConsume) { } else if (!superResubAfterConsume) {
// default value is -1, which mean do not resub // default value is -1, which mean do not resub
g_queryInfo.superQueryInfo.endAfterConsume = -1; g_queryInfo.superQueryInfo.resubAfterConsume = -1;
} }
// supert table sqls // supert table sqls
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册