Skip to content

Commit

Permalink
Merge pull request #211 from jeremyandrews/nng
Browse files Browse the repository at this point in the history
update nng
  • Loading branch information
jeremyandrews authored Nov 1, 2020
2 parents 091faa7 + d141152 commit 7deba3e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- replace TermLogger with SimpleLogger for increased logging flexibility
- add initial OCI Dockerfile for container-based workflows
- use checked subtraction when calculating drift duration to prevent panic
- update `nng-rs` dependency to fix bug when testing that the manager is ready

## 0.10.3 Oct 14, 2020
- fixup sticky redirect tests to properly test functionality
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tokio = { version = "0.2.20", features = ["fs", "io-util", "macros", "rt-core",
url = "2.1"

# optional dependencies
nng = { version = "0.5", optional = true }
nng = { version = "1.0.0-rc", optional = true }

[features]
default = ["reqwest/default-tls"]
Expand Down
6 changes: 3 additions & 3 deletions src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ fn merge_requests_from_worker(

/// Helper to send EXIT command to worker.
fn tell_worker_to_exit(server: &Socket) -> bool {
let mut message = Message::new().unwrap();
let mut message = Message::new();
serde_cbor::to_writer(&mut message, &GooseUserCommand::EXIT)
.map_err(|error| eprintln!("{:?}", error))
.expect("failed to serialize user command");
Expand Down Expand Up @@ -438,7 +438,7 @@ pub async fn manager_main(mut goose_attack: GooseAttack) -> GooseAttack {
}

// Send vector of user initializers to worker.
let mut message = Message::new().unwrap();
let mut message = Message::new();
serde_cbor::to_writer(&mut message, &users)
.map_err(|error| eprintln!("{:?}", error))
.expect("failed to serialize user initializers");
Expand Down Expand Up @@ -468,7 +468,7 @@ pub async fn manager_main(mut goose_attack: GooseAttack) -> GooseAttack {
}
// Received message from known Worker.
else {
let mut message = Message::new().unwrap();
let mut message = Message::new();

// When starting a Gaggle, some Workers may start before others and
// will send regular heartbeats to the Manager to confirm the load
Expand Down
2 changes: 1 addition & 1 deletion src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ pub fn push_metrics_to_manager(
get_response: bool,
) -> bool {
debug!("[{}] pushing metrics to manager", get_worker_id(),);
let mut message = Message::new().unwrap();
let mut message = Message::new();

serde_cbor::to_writer(&mut message, &metrics)
.map_err(|error| eprintln!("{:?} worker_id({})", error, get_worker_id()))
Expand Down

0 comments on commit 7deba3e

Please sign in to comment.