Skip to content

Commit 6742176

Browse files
committed
[py] Dedup connector status definitions.
In an earlier commit I stupidly asked cursor to generate Python bindings for connector status endpoints. Without a shadow of a doubt, cursor generated new classes, instead of extending existing classes in stats.py. Not being the owner of this code, I did not notice it. This commit dedups the classes, merging new connector status fields back into existing classes. It also adds the new `health` field introduced in the previous commit. Signed-off-by: Leonid Ryzhyk <ryzhyk@gmail.com>
1 parent cb1305c commit 6742176

File tree

4 files changed

+160
-244
lines changed

4 files changed

+160
-244
lines changed

python/feldera/connector_stats.py

Lines changed: 0 additions & 223 deletions
This file was deleted.

python/feldera/pipeline.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
from feldera.rest.sql_table import SQLTable
3434
from feldera.rest.sql_view import SQLView
3535
from feldera.runtime_config import RuntimeConfig
36-
from feldera.connector_stats import InputConnectorStatus, OutputConnectorStatus
37-
from feldera.stats import PipelineStatistics
36+
from feldera.stats import InputEndpointStatus, OutputEndpointStatus, PipelineStatistics
3837
from feldera.types import CheckpointMetadata
3938

4039

@@ -247,21 +246,21 @@ def resume_connector(self, table_name: str, connector_name: str):
247246

248247
def input_connector_stats(
249248
self, table_name: str, connector_name: str
250-
) -> InputConnectorStatus:
249+
) -> InputEndpointStatus:
251250
"""
252251
Get the status of the specified input connector.
253252
"""
254-
return InputConnectorStatus.from_dict(
253+
return InputEndpointStatus.from_dict(
255254
self.client.input_connector_stats(self.name, table_name, connector_name)
256255
)
257256

258257
def output_connector_stats(
259258
self, view_name: str, connector_name: str
260-
) -> OutputConnectorStatus:
259+
) -> OutputEndpointStatus:
261260
"""
262261
Get the status of the specified output connector.
263262
"""
264-
return OutputConnectorStatus.from_dict(
263+
return OutputEndpointStatus.from_dict(
265264
self.client.output_connector_stats(self.name, view_name, connector_name)
266265
)
267266

0 commit comments

Comments
 (0)