Skip to content

Commit 198f5b8

Browse files
committed
clean up
1 parent d324044 commit 198f5b8

11 files changed

Lines changed: 33 additions & 1208 deletions

File tree

client/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ pub struct ConfiguredClient<C> {
390390
headers: Arc<RwLock<ClientHeaders>>,
391391
/// Capabilities as read from the `get_system_info` RPC call made on client connection
392392
capabilities: Option<get_system_info_response::Capabilities>,
393-
workers: Arc<ClientWorkerSet>, // ClientWorkerSet
393+
workers: Arc<ClientWorkerSet>,
394394
}
395395

396396
impl<C> ConfiguredClient<C> {

client/src/worker_registry/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ impl SlotManagerImpl {
109109
}
110110
}
111111

112+
/// This trait represents a shared namespace worker that sends worker heartbeats and worker commands.
112113
pub trait SharedNamespaceWorkerTrait: std::fmt::Debug {
114+
/// Namespace that the shared namespace worker is connected to.
113115
fn namespace(&self) -> String;
114116

115117
/// Unregisters a heartbeat callback. Returns the callback removed, as well as a bool that
@@ -120,6 +122,7 @@ pub trait SharedNamespaceWorkerTrait: std::fmt::Debug {
120122
worker_instance_key: String,
121123
) -> (Option<Box<dyn Fn() -> WorkerHeartbeat + Send + Sync>>, bool);
122124

125+
/// Registers a heartbeat callback.
123126
fn register_callback(
124127
&self,
125128
worker_instance_key: String,
@@ -184,7 +187,7 @@ impl ClientWorkerSet {
184187
worker.register_callback(worker_instance_key, heartbeat_callback)
185188
}
186189

187-
/// Unregister
190+
/// Unregister a worker with the worker heartbeat manager.
188191
pub fn unregister_heartbeat_worker(
189192
&self,
190193
namespace: String,

core/src/core_tests/workflow_tasks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2995,7 +2995,7 @@ async fn both_normal_and_sticky_pollers_poll_concurrently() {
29952995
Some("stickytq".to_string()),
29962996
Arc::new(mock_client),
29972997
None,
2998-
false,
2998+
None,
29992999
);
30003000

30013001
for _ in 1..50 {

core/src/telemetry/metrics.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#[cfg(test)]
2+
use crate::TelemetryInstance;
13
use crate::abstractions::dbg_panic;
24

35
use std::{

core/src/test_help/integ_helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ pub fn build_fake_worker(
185185
}
186186

187187
pub fn mock_worker(mocks: MocksHolder) -> Worker {
188-
let sticky_q = sticky_q_name_for_worker("unit-test", &mocks.inputs.config);
188+
let sticky_q = sticky_q_name_for_worker("unit-test", mocks.inputs.config.max_cached_workflows);
189189
let act_poller = if mocks.inputs.config.no_remote_activities {
190190
None
191191
} else {

0 commit comments

Comments
 (0)