|
@@ -45,15 +45,15 @@ class ApplicationCDCMonitor:
|
|
|
backResult = requests.get(
|
|
|
url='http://{}:{}{}/{}'.format(self.cdc_url, self.cdc_port, self.cdc_changefeeds_url, task_id),
|
|
|
headers=headers)
|
|
|
- backResult = backResult.json
|
|
|
- if backResult is None:
|
|
|
+ back = backResult.json()
|
|
|
+ if back is None:
|
|
|
os.system(
|
|
|
'cd /data/tidb-deploy/cdc-8300/bin; ./cdc cli changefeed create --pd=http://192.168.0.184:2379 '
|
|
|
'--sink-uri="mysql://data:hcst@2021@139.186.27.96:3390" --config ../conf/{task_id}.toml '
|
|
|
'--changefeed-id={task_id} '.format(task_id=task_id))
|
|
|
else:
|
|
|
- print(backResult, '--------2-------')
|
|
|
- if backResult['error'] is not None:
|
|
|
+ print(back, '--------2-------')
|
|
|
+ if back['error'] is not None:
|
|
|
requests.delete(url='http://{}:{}{}/{}'.format(self.cdc_url, self.cdc_port,
|
|
|
self.cdc_changefeeds_url, task_id))
|
|
|
os.system(
|