add chrono for benchmarking
This commit is contained in:
+1
-1
@@ -1,3 +1,3 @@
|
||||
mod worker;
|
||||
|
||||
pub use worker::{Manager, Queue};
|
||||
pub use worker::{Manager, Queue, WorkerStatus};
|
||||
|
||||
@@ -106,8 +106,7 @@ impl<T: Runner + std::marker::Send + 'static> Manager<T> {
|
||||
self.queue.not_empty.notify_one();
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn healthcheck(&self, target: WorkerStatus) -> bool {
|
||||
pub fn healthcheck(&self, target: WorkerStatus) -> bool {
|
||||
for w in &self.workers {
|
||||
if w.lock().unwrap().get_status() != target {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user