Skip to content

Commit 41e2d98

Browse files
committed
Bump examples
1 parent 1d15e44 commit 41e2d98

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

examples/example_cloud_worker_group.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
import asyncio
31-
from cribl_control_plane.models import ConfigGroup, ConfigGroupCloud, CloudProvider, ProductsCore
31+
from cribl_control_plane.models import ConfigGroup, ConfigGroupCloud, CloudProvider, ProductsCore, ConfigGroupEstimatedIngestRate, GroupCreateRequestEstimatedIngestRate
3232
from auth import AuthCloud, CloudConfiguration
3333

3434

@@ -49,7 +49,7 @@
4949
provisioned=False,
5050
is_fleet=False,
5151
is_search=False,
52-
estimated_ingest_rate=2048, # Equivalent to 24 MB/s maximum estimated ingest rate with 9 Worker Processes
52+
estimated_ingest_rate=ConfigGroupEstimatedIngestRate.RATE24_MB_PER_SEC, # Equivalent to 24 MB/s maximum estimated ingest rate with 9 Worker Processes
5353
id=WORKER_GROUP_ID,
5454
name="my-aws-worker-group"
5555
)
@@ -83,13 +83,13 @@ async def main():
8383
provisioned=group.provisioned,
8484
is_fleet=group.is_fleet,
8585
is_search=group.is_search,
86-
estimated_ingest_rate=group.estimated_ingest_rate,
86+
estimated_ingest_rate=GroupCreateRequestEstimatedIngestRate(group.estimated_ingest_rate.value) if group.estimated_ingest_rate else None,
8787
name=group.name
8888
)
8989
print(f"✅ Worker Group created: {group.id}")
9090

9191
# Scale and provision the Worker Group
92-
group.estimated_ingest_rate = 4096 # Equivalent to 48 MB/s maximum estimated ingest rate with 21 Worker Processes
92+
group.estimated_ingest_rate = ConfigGroupEstimatedIngestRate.RATE48_MB_PER_SEC # Equivalent to 48 MB/s maximum estimated ingest rate with 21 Worker Processes
9393
group.provisioned = True
9494
cribl.groups.update(
9595
product=ProductsCore.STREAM,

examples/example_worker_group_replication.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import sys
2727
from typing import Optional
2828
from cribl_control_plane import CriblControlPlane
29-
from cribl_control_plane.models import ConfigGroup, ProductsCore
29+
from cribl_control_plane.models import ConfigGroup, ProductsCore, GroupCreateRequestEstimatedIngestRate, GroupCreateRequestType
3030
from auth import create_cribl_client
3131

3232

@@ -103,12 +103,12 @@ def replicate_worker_group(client: CriblControlPlane, source_id: str) -> Optiona
103103
provisioned=source.provisioned,
104104
is_fleet=source.is_fleet,
105105
is_search=source.is_search,
106-
estimated_ingest_rate=source.estimated_ingest_rate,
106+
estimated_ingest_rate=GroupCreateRequestEstimatedIngestRate(source.estimated_ingest_rate.value) if source.estimated_ingest_rate else None,
107107
inherits=source.inherits,
108108
max_worker_age=source.max_worker_age,
109109
streamtags=source.streamtags,
110110
tags=source.tags,
111-
type_=source.type,
111+
type_=GroupCreateRequestType(source.type.value) if source.type else None,
112112
upgrade_version=source.upgrade_version
113113
)
114114

0 commit comments

Comments
 (0)