10 Commits

Author SHA1 Message Date
d03f086c92 2.0.13 2022-08-05 12:53:19 +02:00
83c1e2bb4e fix(core): update 2022-08-05 12:53:19 +02:00
faa5d6d542 2.0.12 2022-08-05 12:33:30 +02:00
6e06e8108b fix(core): update 2022-08-05 12:33:29 +02:00
45ce23ec11 2.0.11 2022-08-02 19:10:44 +02:00
93ef6a3d6b fix(core): update 2022-08-02 19:10:44 +02:00
609873b4ad 2.0.10 2022-08-01 12:52:53 +02:00
4a8bbc3d13 fix(core): update 2022-08-01 12:52:53 +02:00
51c2d4f6e0 2.0.9 2022-07-30 18:03:17 +02:00
45091d6b8c fix(core): update 2022-07-30 18:03:17 +02:00
6 changed files with 1229 additions and 1337 deletions

2532
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartclickhouse",
"version": "2.0.8",
"version": "2.0.13",
"private": false,
"description": "an odm for talking to clickhouse",
"main": "dist_ts/index.js",
@ -10,16 +10,16 @@
"license": "MIT",
"scripts": {
"test": "(tstest test/ --web)",
"build": "(tsbuild --web)",
"build": "(tsbuild --web --allowimplicitany)",
"createGrafana": "docker run --name grafana -d -p 4000:3000 grafana/grafana-oss",
"createClickhouse": "docker run --name some-clickhouse-server --ulimit nofile=262144:262144 -p 8123:8123 -p 9000:9000 --volume=$PWD/.nogit/testdatabase:/var/lib/clickhouse yandex/clickhouse-server"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.63",
"@gitzone/tsbundle": "^2.0.6",
"@gitzone/tstest": "^1.0.72",
"@gitzone/tsbuild": "^2.1.65",
"@gitzone/tsbundle": "^2.0.7",
"@gitzone/tstest": "^1.0.73",
"@pushrocks/tapbundle": "^5.0.4",
"@types/node": "^18.6.2",
"@types/node": "^18.6.4",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0"
},
@ -28,7 +28,7 @@
"@pushrocks/smartobject": "^1.0.10",
"@pushrocks/smartpromise": "^3.1.7",
"@pushrocks/smarturl": "^3.0.2",
"@pushrocks/webrequest": "^3.0.9"
"@pushrocks/webrequest": "^3.0.12"
},
"browserslist": [
"last 1 chrome versions"

View File

@ -7,6 +7,7 @@ tap.test('first test', async () => {
testClickhouseDb = new smartclickhouse.SmartClickHouseDb({
url: 'http://localhost:8123',
database: 'test2',
unref: true,
});
});

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@pushrocks/smartclickhouse',
version: '2.0.8',
version: '2.0.13',
description: 'an odm for talking to clickhouse'
}

View File

@ -7,6 +7,12 @@ export interface IClickhouseConstructorOptions {
database: string;
username?: string;
password?: string;
/**
* allow services to exit when waiting for clickhouse startup
* this allows to leave the lifecycle flow to other processes
* like a listening server.
*/
unref?: boolean;
}
export class SmartClickHouseDb {
@ -44,7 +50,7 @@ export class SmartClickHouseDb {
});
if (!available) {
console.log(`NOT OK: tried pinging ${this.options.url}... Trying again in 5 seconds.`);
await plugins.smartdelay.delayFor(5000);
await plugins.smartdelay.delayFor(5000, null, this.options.unref);
}
}
}

View File

@ -97,6 +97,9 @@ export class TimeDataTable {
* stores a json and tries to map it to the nested syntax
*/
public async addData(dataArg: any) {
if (this.healingDeferred) {
return;
}
// the storageJson
let storageJson: { [key: string]: any } = {};