Skip to content

Commit

Permalink
Add current worker name
Browse files Browse the repository at this point in the history
  • Loading branch information
blakestier committed Mar 1, 2022
1 parent ca2c3c1 commit a1dd125
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/operators/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use crate::log_func;
use crate::pyo3_extensions::{TdPyAny, TdPyCallable, TdPyIterator};
use crate::with_traceback;
use log::debug;
use std::thread;

// These are all shims which map the Timely Rust API into equivalent
// calls to Python functions through PyO3.
Expand Down Expand Up @@ -142,6 +143,8 @@ pub(crate) fn reduce_epoch_local(
all_key_value_in_epoch: &Vec<(TdPyAny, TdPyAny)>,
) {
Python::with_gil(|py| {
let _current = thread::current();
let worker_name = _current.name().unwrap();
for (key, value) in all_key_value_in_epoch {
let aggregator = aggregators.entry(key.clone_ref(py));
debug!(
Expand Down

0 comments on commit a1dd125

Please sign in to comment.