Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
richo committed Jul 27, 2020
1 parent 55d6971 commit 2d59eb8
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 35 deletions.
64 changes: 32 additions & 32 deletions Cargo.toml
Expand Up @@ -30,48 +30,48 @@ default = [ "usb" ]


[dependencies]
rocket = { version = "0.4.2", optional = true, features = ["tls"] }
rocket_contrib = { version = "0.4.2", optional = true, default_features = false, features = ["handlebars_templates", "json", "serve"] }
diesel = { version = "1.4.3", features = ["postgres", "r2d2", "serde_json", "chrono"], optional = true }
diesel-derive-enum = { version = "0.4.4", optional = true, features = ["postgres"] }
rocket = { version = "0.4.5", optional = true, features = ["tls"] }
rocket_contrib = { version = "0.4.5", optional = true, default_features = false, features = ["handlebars_templates", "json", "serve"] }
diesel = { version = "1.4.5", features = ["postgres", "r2d2", "serde_json", "chrono"], optional = true }
diesel-derive-enum = { version = "1.1.0", optional = true, features = ["postgres"] }
diesel_migrations = { version = "1.4.0", optional = true }
bcrypt = { version = "0.6.1", optional = true }
rand = { version = "0.7.2", optional = true }
oauth2 = { version = "2.0.0", optional = true }
bcrypt = { version = "0.8.1", optional = true }
rand = { version = "0.7.3", optional = true }
oauth2 = { version = "3.0.0", optional = true }
serde_urlencoded = { version = "0.6.1", optional = true }
libusb = { version = "0.3.0", optional = true }
ptp = { git = "https://github.com/richo/rust-ptp", optional = true }

toml = "0.5.5"
clap = "2.33.0"
toml = "0.5.6"
clap = "2.33.1"
dotenv = "0.15.0"
serde = { version = "1.0.102", features = ["derive"] }
serde_derive = "1.0.102"
serde_json = "1.0.41"
failure = "0.1.6"
serde = { version = "1.0.114", features = ["derive"] }
serde_derive = "1.0.114"
serde_json = "1.0.56"
failure = "0.1.8"
lazy_static = "1.4.0"
chrono = { version = "0.4.9", features = ["serde"] }
regex = "1.3.1"
reqwest = "0.9.22"
log = "0.4.8"
pretty_env_logger = "0.3.1"
chrono = { version = "0.4.13", features = ["serde"] }
regex = "1.3.9"
reqwest = "0.10.6"
log = "0.4.11"
pretty_env_logger = "0.4.0"
hashing-copy = "0.3.0"
tempfile = "3.1.0"
walkdir = "2.2.9"
hex = "0.4.0"
digest = "0.8.1"
sha2 = "0.8.0"
handlebars = "1.1.0"
sendgrid = "0.9.0"
url = "1.7.0"
tus = "0.3.0"
failure_derive = "0.1.6"
filetime = "0.2.7"
rpassword = "4.0.1"
dirs = "2.0.2"
time = "0.1.42"
walkdir = "2.3.1"
hex = "0.4.2"
digest = "0.9.0"
sha2 = "0.9.1"
handlebars = "3.3.0"
sendgrid = "0.11.3"
url = "2.1.1"
tus = "1.0.0"
failure_derive = "0.1.8"
filetime = "0.2.10"
rpassword = "4.0.5"
dirs = "3.0.1"
time = "0.2.16"
dropbox-content-hasher = "0.3.0"
lockfile = "0.2.1"
lockfile = "0.2.2"
redacted_debug = "0.1.0"
pshovr = "0.1.0"

Expand Down
29 changes: 26 additions & 3 deletions src/bin/runner.rs
Expand Up @@ -12,6 +12,8 @@ use stokepile::mountable::Mountable;
use stokepile::staging::Stager;
use stokepile::storage;

use std::io;

fn cli_opts<'a, 'b>() -> App<'a, 'b> {
cli::base_opts()
.about("Performs a single run, uploading footage from all connected devices")
Expand Down Expand Up @@ -64,12 +66,33 @@ fn main() {
};

for device in devices {
let msg = format!("Finished staging: {}", device.name());
let num_files = device.stage_files(&stager)?;
if num_files > 0 {
let finish_msg = format!("Finished staging: {}", device.name());
let incomplete_msg = format!("Partially staged {}, device will need a second run", device.name());
let notify = |msg: String| {
if let Err(e) = ctx.notify(&msg) {
error!("Failed to send push notification: {:?}", e);
}
};
match device.stage_files(&stager) {
Ok(num_files) => {
if num_files > 0 {
notify(finish_msg);
}
},
// TODO(richo) We probably want to just have this be an io::Error instead of
// faffing about with failure. As it stands, we use .context() to help with
// debugging which more or less implies failure, but maybe there's some
// middleground.
Err(err) => {
if let Ok(err) = err.downcast::<io::Error>() {
if err.kind() == io::ErrorKind::Interrupted {
warn!("Staging device full, continuing");
notify(incomplete_msg);
break
}
}
return Err(err)
}
}
}

Expand Down

0 comments on commit 2d59eb8

Please sign in to comment.