renyupeng 3 years ago
parent
commit
4fffdec6f0
1 changed files with 3 additions and 1 deletions
  1. 3 1
      monitor/ApplicationCDCMonitor.py

+ 3 - 1
monitor/ApplicationCDCMonitor.py

@@ -28,13 +28,15 @@ class ApplicationCDCMonitor:
         headers = {'Content-Type': 'application/json'}
         repo = requests.get(url='http://{}:{}{}?'.format(self.cdc_url, self.cdc_port, self.cdc_changefeeds_url),
                             headers=headers)
+        errrepo = requests.get(url='http://{}:{}{}?state=error'.format(self.cdc_url, self.cdc_port, self.cdc_changefeeds_url),
+                               headers=headers)
+        print(errrepo.json(),'---error---')
         message = repo.json()
         print(message)
         for json in message:
             task_id = json['id']
             tso = json['checkpoint_tso']
             error = json['error']
-            print(error,'-----',task_id)
             if error is not None:
 
                 requests.delete(url='http://{}:{}{}/{}'.format(self.cdc_url, self.cdc_port,