Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
609873b4ad | |||
4a8bbc3d13 | |||
51c2d4f6e0 | |||
45091d6b8c |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@pushrocks/smartclickhouse",
|
||||
"version": "2.0.8",
|
||||
"version": "2.0.10",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@pushrocks/smartclickhouse",
|
||||
"version": "2.0.8",
|
||||
"version": "2.0.10",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartclickhouse",
|
||||
"version": "2.0.8",
|
||||
"version": "2.0.10",
|
||||
"private": false,
|
||||
"description": "an odm for talking to clickhouse",
|
||||
"main": "dist_ts/index.js",
|
||||
|
@ -7,6 +7,7 @@ tap.test('first test', async () => {
|
||||
testClickhouseDb = new smartclickhouse.SmartClickHouseDb({
|
||||
url: 'http://localhost:8123',
|
||||
database: 'test2',
|
||||
unref: true,
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartclickhouse',
|
||||
version: '2.0.8',
|
||||
version: '2.0.10',
|
||||
description: 'an odm for talking to clickhouse'
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 } = {};
|
||||
|
Reference in New Issue
Block a user