fix(core): update
This commit is contained in:
@@ -39,13 +39,15 @@ export class SmartClickHouseDb {
|
||||
if (dropOld) {
|
||||
await this.clickhouseClient.queryPromise(`DROP DATABASE IF EXISTS ${this.options.database}`);
|
||||
}
|
||||
await this.clickhouseClient.queryPromise(`CREATE DATABASE IF NOT EXISTS ${this.options.database}`);
|
||||
await this.clickhouseClient.queryPromise(
|
||||
`CREATE DATABASE IF NOT EXISTS ${this.options.database}`
|
||||
);
|
||||
}
|
||||
|
||||
public async pingDatabaseUntilAvailable() {
|
||||
let available = false;
|
||||
while(!available) {
|
||||
available = await this.clickhouseClient.ping().catch(err => {
|
||||
while (!available) {
|
||||
available = await this.clickhouseClient.ping().catch((err) => {
|
||||
return false;
|
||||
});
|
||||
if (!available) {
|
||||
|
||||
Reference in New Issue
Block a user