Skip to content

Worker Versioning #340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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