Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ on:
jobs:
build:

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

strategy:
matrix:
node-version: [14.x,16.x]
node-version: [16.x,20.x]
steps:

- name: Build Tools
Expand All @@ -25,7 +25,7 @@ jobs:
sudo apt-get install -y python3 python3-pip python-is-python3

- name: Checkout TDengine
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
repository: 'taosdata/TDengine'
Expand Down Expand Up @@ -59,15 +59,22 @@ jobs:
run: |
nohup sudo taosadapter &

- uses: actions/checkout@v3
- name: Checkout current repo
uses: actions/checkout@v4
with:
path: 'nodejs-connector'
clean: true
set-safe-directory: true



- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: test nodejs websocket
working-directory: nodejs
working-directory: nodejs-connector/nodejs
run: |
ls -al
npm install
Expand Down
3 changes: 1 addition & 2 deletions nodejs/example/basicSchemaless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function Prepare() {

await wsSql.exec('create database if not exists power KEEP 3650 DURATION 10 BUFFER 16 WAL_LEVEL 1;');
await wsSql.exec('CREATE STABLE if not exists power.meters (ts timestamp, current float, voltage int, phase float) TAGS (location binary(64), groupId int);');
wsSql.close();
await wsSql.close();
}

(async () => {
Expand All @@ -32,7 +32,6 @@ async function Prepare() {
await wsSchemaless.schemalessInsert([influxdbData], SchemalessProto.InfluxDBLineProtocol, Precision.NANO_SECONDS, 0);
await wsSchemaless.schemalessInsert([telnetData], SchemalessProto.OpenTSDBTelnetLineProtocol, Precision.SECONDS, 0);
await wsSchemaless.schemalessInsert([jsonData], SchemalessProto.OpenTSDBJsonFormatProtocol, Precision.SECONDS, 0);
wsSchemaless.close();
} catch (e) {
console.error(e);
}finally {
Expand Down
2 changes: 1 addition & 1 deletion nodejs/example/basicSql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ let dsn = 'ws://root:taosdata@localhost:6041';
let result = wsRows.getData();
console.log('queryRes.Scan().then=>', result);
}
wsRows.close()
await wsRows.close()
}


Expand Down
Loading