update
This commit is contained in:
parent
30b1c576e1
commit
e1ca6a5e9c
|
@ -1908,6 +1908,8 @@ class TaskCreateConsumers(StateTransitionTask):
|
||||||
return state.canCreateConsumers()
|
return state.canCreateConsumers()
|
||||||
|
|
||||||
def _executeInternal(self, te: TaskExecutor, wt: WorkerThread):
|
def _executeInternal(self, te: TaskExecutor, wt: WorkerThread):
|
||||||
|
|
||||||
|
if Config.getConfig().connector_type == 'native':
|
||||||
dbname = self._db.getName()
|
dbname = self._db.getName()
|
||||||
|
|
||||||
sTable = self._db.getFixedSuperTable() # type: TdSuperTable
|
sTable = self._db.getFixedSuperTable() # type: TdSuperTable
|
||||||
|
@ -1917,6 +1919,9 @@ class TaskCreateConsumers(StateTransitionTask):
|
||||||
if Dice.throw(50)==0: # because subscribe is cost so much time , Reduce frequency of this task
|
if Dice.throw(50)==0: # because subscribe is cost so much time , Reduce frequency of this task
|
||||||
if sTable.hasTopics(wt.getDbConn()):
|
if sTable.hasTopics(wt.getDbConn()):
|
||||||
sTable.createConsumer(wt.getDbConn(),random.randint(1,10))
|
sTable.createConsumer(wt.getDbConn(),random.randint(1,10))
|
||||||
|
else:
|
||||||
|
print(" restful not support tmq consumers")
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
class TaskCreateSuperTable(StateTransitionTask):
|
class TaskCreateSuperTable(StateTransitionTask):
|
||||||
|
|
Loading…
Reference in New Issue