Skip to content

Commit 504fc05

Browse files
committed
More rusty, clarify naming
1 parent efb91e4 commit 504fc05

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

temporalio/bridge/src/runtime.rs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -131,20 +131,13 @@ pub fn init_runtime(options: RuntimeOptions) -> PyResult<RuntimeRef> {
131131
}
132132
}
133133

134-
let mut runtime_options_build = RuntimeOptionsBuilder::default();
135-
runtime_options_build.telemetry_options(
136-
telemetry_build
137-
.build()
138-
.map_err(|err| PyValueError::new_err(format!("Invalid telemetry config: {err}")))?,
139-
);
140-
141-
if let Some(ms) = worker_heartbeat_interval_millis {
142-
runtime_options_build.heartbeat_interval(Some(Duration::from_millis(ms)));
143-
} else {
144-
runtime_options_build.heartbeat_interval(None);
145-
}
146-
147-
let runtime_options = runtime_options_build
134+
let runtime_options = RuntimeOptionsBuilder::default()
135+
.telemetry_options(
136+
telemetry_build
137+
.build()
138+
.map_err(|err| PyValueError::new_err(format!("Invalid telemetry config: {err}")))?,
139+
)
140+
.heartbeat_interval(worker_heartbeat_interval_millis.map(Duration::from_millis))
148141
.build()
149142
.map_err(|err| PyValueError::new_err(format!("Invalid runtime options: {err}")))?;
150143

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def pytest_addoption(parser):
6060

6161

6262
@pytest.fixture(autouse=True)
63-
def _force_worker_skip_client_set(monkeypatch):
63+
def _skip_client_worker_set_check(monkeypatch):
6464
original_init = temporalio.worker.Worker.__init__
6565

6666
def patched_init(self, *args, **kwargs):

0 commit comments

Comments
 (0)