modify node ci example

This commit is contained in:
menshibin 2024-09-25 21:54:45 +08:00
parent a94295f372
commit 6e5e98bbd4
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ async function prepare() {
let createTopic = `CREATE TOPIC IF NOT EXISTS ${topics[0]} AS SELECT * FROM ${db}.${stable}`;
await wsSql.exec(createTopic);
wsSql.close();
await wsSql.close();
}
async function insert() {
@ -63,7 +63,7 @@ async function insert() {
await wsSql.exec(`INSERT INTO d1001 USING ${stable} (location, groupId) TAGS ("California.SanFrancisco", 3) VALUES (NOW, ${10 + i}, ${200 + i}, ${0.32 + i})`);
await sleep(100);
}
wsSql.close();
await wsSql.close();
}
async function subscribe(consumer) {

View File

@ -96,7 +96,7 @@ async function consumer() {
console.log("Consumer unsubscribed successfully.");
}
catch (err) {
console.error(`Failed to unsubscribe consumer, topic: ${topic}, groupId: ${groupId}, clientId: ${clientId}, ErrCode: ${err.code}, ErrMessage: ${err.message}`);
console.error(`Failed to consumer, topic: ${topic}, groupId: ${groupId}, clientId: ${clientId}, ErrCode: ${err.code}, ErrMessage: ${err.message}`);
throw err;
}
finally {