Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1256 from mozilla-services/chore/deps-update
Browse files Browse the repository at this point in the history
chore: upgrade Rust dependencies
  • Loading branch information
bbangert authored May 30, 2018
2 parents 02cd0ea + d4cd1a6 commit 23b17d0
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 100 deletions.
156 changes: 92 additions & 64 deletions Cargo.lock

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions autopush_rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,62 +15,62 @@ name = "autopush"
name = "autopush_rs"
path = "src/main.rs"

[dependencies.config]
git = "https://github.com/mehcode/config-rs"
rev = "e8fa9fee96185ddd18ebcef8a925c75459111edb"

[dependencies]
base64 = "0.9.1"
bytes = "0.4.6"
cadence = "0.13.2"
bytes = "0.4.8"
cadence = "0.14.0"
chan-signal = "0.3.1"
chrono = "0.4.2"
docopt = "1.0.0"
env_logger = { version = "0.5.6", default-features = false }
env_logger = { version = "0.5.10", default-features = false }
error-chain = "0.11.0"
fernet = "0.1"
fernet = "0.1.0"
futures = "0.1.21"
futures-backoff = "0.1"
futures-backoff = "0.1.0"
hex = "0.3.2"
hostname = "0.1.4"
hostname = "0.1.5"
httparse = "1.2.4"
hyper = "0.11.25"
lazy_static = "1.0.0"
libc = "0.2.40"
hyper = "0.11.27"
lazy_static = "1.0.1"
libc = "0.2.41"
# log: Use this version for debug builds
# log = "0.4.1"
# log: Use this for release builds (leave in for commits)
log = { version = "0.4.1", features = ["max_level_trace", "release_max_level_warn"] }
matches = "0.1.6"
openssl = "0.10.5"
rand = "0.4"
regex = "0.2"
openssl = "0.10.8"
rand = "0.5.0"
regex = "1.0.0"
reqwest = { version = "0.8.5", features = ["unstable"] }
rusoto_core = "0.32.0"
rusoto_credential = "0.11.0"
rusoto_dynamodb = "0.32.0"
sentry = "0.2.0"
serde = "1.0.45"
serde_derive = "1.0.21"
serde = "1.0.63"
serde_derive = "1.0.63"
serde_dynamodb = "0.1.2"
serde_json = "1.0.13"
serde_json = "1.0.18"
# slog: Use this first version for debug builds
# slog = { version = "2.2.3" , features = ["max_level_trace", "release_max_level_debug"] }
# slog: Use this for release builds (leave in for commits)
slog = "2.2.3"
slog-async = "2.2.0"
slog-term = "2.3.0"
slog-async = "2.3.0"
slog-term = "2.4.0"
slog-json = "2.2.0"
slog-scope = "4.0.1"
slog-stdlog = "3.0.2"
# state_machine_future = { version = "0.1.6", features = ["debug_code_generation"] }
state_machine_future = "0.1.6"
time = "0.1.39"
tokio-core = "0.1.16"
time = "0.1.40"
tokio-core = "0.1.17"
tokio-io = "0.1.6"
tokio-openssl = "0.2.0"
tokio-service = "0.1.0"
tokio-tungstenite = { version = "0.5.1", default-features = false }
tungstenite = { version = "0.5.3", default-features = false }
uuid = { version = "0.6.2", features = ["serde", "v4"] }
uuid = { version = "0.6.5", features = ["serde", "v4"] }
woothee = "0.7.3"

[dependencies.config]
git = "https://github.com/mehcode/config-rs"
rev = "e8fa9fee96185ddd18ebcef8a925c75459111edb"
6 changes: 2 additions & 4 deletions autopush_rs/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,7 @@ where
.with_tag("ua_os_family", metrics_os)
.with_tag("ua_browser_family", metrics_browser)
.with_tag("host", &webpush.stats.host)
.send()
.ok();
.send();

// If there's direct unack'd messages, they need to be saved out without blocking
// here
Expand Down Expand Up @@ -1033,8 +1032,7 @@ where
.metrics
.incr_with_tags("ua.command.unregister")
.with_tag("code", &code.to_string())
.send()
.ok();
.send();
transition!(SendThenWait {
remaining_data: vec![msg],
poll_complete: false,
Expand Down
3 changes: 1 addition & 2 deletions autopush_rs/src/db/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,7 @@ pub fn lookup_user(
metrics
.incr_with_tags("ua.expiration")
.with_tag("code", &code.to_string())
.send()
.ok();
.send();
let response = drop_user(ddb, &uaid2, &router_table)
.and_then(|_| future::ok((hello_response, None)))
.chain_err(|| "Unable to drop user");
Expand Down
8 changes: 3 additions & 5 deletions autopush_rs/src/db/util.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use chrono::Utc;
use rand;
use rand::distributions::{IndependentSample, Range};
use rand::{thread_rng, Rng};

/// Generate a last_connect
///
Expand All @@ -9,9 +8,8 @@ use rand::distributions::{IndependentSample, Range};
/// a total of 240 keys per month depending on when the user migrates forward.
pub fn generate_last_connect() -> u64 {
let today = Utc::now();
let mut rng = rand::thread_rng();
let between = Range::new(0, 10);
let num = between.ind_sample(&mut rng);
let mut rng = thread_rng();
let num = rng.gen_range(0, 10);
let val = format!("{}{:04}", today.format("%Y%m%H"), num);
val.parse::<u64>().unwrap()
}
2 changes: 1 addition & 1 deletion autopush_rs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Usage: autopush_rs [options]
Options:
-h, --help Show this message.
--config-connection=CONFIGFILE Connection confiruation file path.
--config-connection=CONFIGFILE Connection configuration file path.
--config-shared=CONFIGFILE Common configuration file path.
";

Expand Down

0 comments on commit 23b17d0

Please sign in to comment.