add use db
This commit is contained in:
parent
53b385108c
commit
091da20ab8
|
@ -163,22 +163,18 @@ class AutoGen:
|
||||||
values = ""
|
values = ""
|
||||||
|
|
||||||
tdLog.info(f" insert child data {child_name} finished, insert rows={cnt}")
|
tdLog.info(f" insert child data {child_name} finished, insert rows={cnt}")
|
||||||
return ts
|
self.ts = ts
|
||||||
|
|
||||||
def insert_data(self, cnt, bContinue=False):
|
def insert_data(self, cnt, bContinue=False):
|
||||||
if not bContinue:
|
if not bContinue:
|
||||||
self.ts = 1600000000000
|
self.ts = 1600000000000
|
||||||
|
|
||||||
currTs = 1600000000000
|
|
||||||
for i in range(self.child_cnt):
|
for i in range(self.child_cnt):
|
||||||
name = f"{self.child_name}{i}"
|
name = f"{self.child_name}{i}"
|
||||||
currTs = self.insert_data_child(name, cnt, self.batch_size, 1)
|
self.insert_data_child(name, cnt, self.batch_size, 1)
|
||||||
|
|
||||||
self.ts = currTs
|
|
||||||
tdLog.info(f" insert data ok, child table={self.child_cnt} insert rows={cnt}")
|
tdLog.info(f" insert data ok, child table={self.child_cnt} insert rows={cnt}")
|
||||||
|
|
||||||
# insert same timestamp to all childs
|
|
||||||
|
|
||||||
# insert same timestamp to all childs
|
# insert same timestamp to all childs
|
||||||
def insert_samets(self, cnt):
|
def insert_samets(self, cnt):
|
||||||
for i in range(self.child_cnt):
|
for i in range(self.child_cnt):
|
||||||
|
|
Loading…
Reference in New Issue