Skip to content

Commit a779607

Browse files
Fixed redundant creation of DatasetApi object
1 parent 3f287ca commit a779607

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/monitor/examples/eg001_get_monitoring_data/controller.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ def worker(args):
2828
# Step 1 end
2929

3030
# Step 2. Get your monitor data
31+
dataset_api = DataSetApi(api_client=api_client)
32+
3133
cursor = ""
3234
result = []
3335
while True:
34-
dataset_api = DataSetApi(api_client=api_client)
3536
response = dataset_api.get_stream_for_dataset(
3637
data_set_name="monitor",
3738
version="2.0",

0 commit comments

Comments
 (0)