Skip to content

Commit

Permalink
fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
temaniarpit27 committed Sep 5, 2024
1 parent 6c752fd commit 92890b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion paladin-core/src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use rand::{distributions::Alphanumeric, Rng};
pub fn get_random_routing_key() -> String {
rand::thread_rng()
.sample_iter(&Alphanumeric)
.take(10)
.take(5)
.map(char::from)
.collect()
}
3 changes: 1 addition & 2 deletions paladin-core/src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,15 +712,14 @@ impl WorkerRuntime {
}

let routing_key = payload.clone().routing_key;
let routing_key_clone = routing_key.clone(); // Clone here
let routing_key_clone = routing_key.clone();

let span = debug_span!("remote_execute", routing_key = %routing_key_clone);
let execution_task = payload.remote_execute().instrument(span);

// Create a future that will wait for an IPC termination signal.
let ipc_sig_term = {
let mut ipc_sig_term_rx = ipc_sig_term_rx.clone();
let routing_key_clone = routing_key_clone.clone(); // Clone here
async move {
loop {
ipc_sig_term_rx.changed().await.expect("IPC channel closed");
Expand Down

0 comments on commit 92890b6

Please sign in to comment.