Skip to content

Commit d7238cd

Browse files
authored
Worker Versioning (#340)
1 parent 677f8be commit d7238cd

File tree

8 files changed

+590
-4
lines changed

8 files changed

+590
-4
lines changed

temporalio/bridge/src/worker.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ pub struct WorkerConfig {
4444
max_activities_per_second: Option<f64>,
4545
max_task_queue_activities_per_second: Option<f64>,
4646
graceful_shutdown_period_millis: u64,
47+
use_worker_versioning: bool,
4748
}
4849

4950
macro_rules! enter_sync {
@@ -232,6 +233,7 @@ impl TryFrom<WorkerConfig> for temporal_sdk_core::WorkerConfig {
232233
// auto-cancel-activity behavior of shutdown will not occur, so we
233234
// always set it even if 0.
234235
.graceful_shutdown_period(Duration::from_millis(conf.graceful_shutdown_period_millis))
236+
.use_worker_versioning(conf.use_worker_versioning)
235237
.build()
236238
.map_err(|err| PyValueError::new_err(format!("Invalid worker config: {}", err)))
237239
}

temporalio/bridge/worker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class WorkerConfig:
4747
max_activities_per_second: Optional[float]
4848
max_task_queue_activities_per_second: Optional[float]
4949
graceful_shutdown_period_millis: int
50+
use_worker_versioning: bool
5051

5152

5253
class Worker:

0 commit comments

Comments
 (0)