Skip to content

Commit

Permalink
Worker Versioning (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sushisource authored Jul 10, 2023
1 parent 677f8be commit d7238cd
Show file tree
Hide file tree
Showing 8 changed files with 590 additions and 4 deletions.
2 changes: 2 additions & 0 deletions temporalio/bridge/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub struct WorkerConfig {
max_activities_per_second: Option<f64>,
max_task_queue_activities_per_second: Option<f64>,
graceful_shutdown_period_millis: u64,
use_worker_versioning: bool,
}

macro_rules! enter_sync {
Expand Down Expand Up @@ -232,6 +233,7 @@ impl TryFrom<WorkerConfig> for temporal_sdk_core::WorkerConfig {
// auto-cancel-activity behavior of shutdown will not occur, so we
// always set it even if 0.
.graceful_shutdown_period(Duration::from_millis(conf.graceful_shutdown_period_millis))
.use_worker_versioning(conf.use_worker_versioning)
.build()
.map_err(|err| PyValueError::new_err(format!("Invalid worker config: {}", err)))
}
Expand Down
1 change: 1 addition & 0 deletions temporalio/bridge/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class WorkerConfig:
max_activities_per_second: Optional[float]
max_task_queue_activities_per_second: Optional[float]
graceful_shutdown_period_millis: int
use_worker_versioning: bool


class Worker:
Expand Down
Loading

0 comments on commit d7238cd

Please sign in to comment.