Skip to content

Commit f684a05

Browse files
committed
lint
1 parent 76ec548 commit f684a05

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

temporalio/bridge/runtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class RuntimeOptions:
9696
"""Python representation of the Rust struct for runtime options."""
9797

9898
telemetry: TelemetryConfig
99-
worker_heartbeat_interval_millis: Optional[int] = None
99+
worker_heartbeat_interval_millis: Optional[int] = 30000 # 30s
100100

101101

102102
# WARNING: This must match Rust runtime::BufferedLogEntry

temporalio/runtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ class RuntimeOptions:
422422
telemetry: TelemetryConfig = field(default_factory=TelemetryConfig)
423423
"""Telemetry configuration applied to the runtime."""
424424

425-
worker_heartbeat_interval: Optional[timedelta] = None
425+
worker_heartbeat_interval: Optional[timedelta] = timedelta(seconds=30)
426426
"""Interval for worker heartbeats. ``None`` disables heartbeating."""
427427

428428
def _to_bridge_config(self) -> temporalio.bridge.runtime.RuntimeOptions:

tests/test_plugins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
import pytest
88

9+
import temporalio.bridge.temporal_sdk_bridge
910
import temporalio.client
1011
import temporalio.converter
1112
import temporalio.worker
12-
import temporalio.bridge.temporal_sdk_bridge
1313
from temporalio import workflow
1414
from temporalio.client import Client, ClientConfig, OutboundInterceptor, WorkflowHistory
1515
from temporalio.contrib.pydantic import pydantic_data_converter

tests/worker/test_worker.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from temporalio.api.workflowservice.v1 import (
1717
DescribeWorkerDeploymentRequest,
1818
DescribeWorkerDeploymentResponse,
19+
ListWorkersRequest,
1920
SetWorkerDeploymentCurrentVersionRequest,
2021
SetWorkerDeploymentCurrentVersionResponse,
2122
SetWorkerDeploymentRampingVersionRequest,
@@ -27,7 +28,12 @@
2728
TaskReachabilityType,
2829
)
2930
from temporalio.common import PinnedVersioningOverride, RawValue, VersioningBehavior
30-
from temporalio.runtime import PrometheusConfig, Runtime, TelemetryConfig
31+
from temporalio.runtime import (
32+
PrometheusConfig,
33+
Runtime,
34+
RuntimeOptions,
35+
TelemetryConfig,
36+
)
3137
from temporalio.service import RPCError
3238
from temporalio.testing import WorkflowEnvironment
3339
from temporalio.worker import (

0 commit comments

Comments
 (0)