Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on nightly #1

Merged
merged 1 commit into from
Aug 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ impl Queue {
let client = Client::open(self.url.as_str())?;
let conn = client.get_connection()?;

conn.del(format!("{}:uuids", self.name))?;
let _: () = conn.del(format!("{}:uuids", self.name))?;

Ok(())
}
Expand All @@ -144,10 +144,10 @@ impl Queue {

let job = Job::new(args);

conn.set_ex(format!("{}:{}", self.name, job.uuid),
serde_json::to_string(&job)?,
expire)?;
conn.rpush(format!("{}:uuids", self.name), &job.uuid)?;
let _: () = conn.set_ex(format!("{}:{}", self.name, job.uuid),
serde_json::to_string(&job)?,
expire)?;
let _: () = conn.rpush(format!("{}:uuids", self.name), &job.uuid)?;

Ok(job.uuid)
}
Expand Down Expand Up @@ -230,7 +230,7 @@ impl Queue {
let mut job: Job = serde_json::from_str(&json)?;

job.status = Status::RUNNING;
conn.set_ex(&key, serde_json::to_string(&job)?, timeout + expire)?;
let _: () = conn.set_ex(&key, serde_json::to_string(&job)?, timeout + expire)?;

let (tx, rx) = channel();
let cafun = afun.clone();
Expand All @@ -256,7 +256,7 @@ impl Queue {
if job.status == Status::RUNNING {
job.status = Status::LOST;
}
conn.set_ex(&key, serde_json::to_string(&job)?, expire)?;
let _: () = conn.set_ex(&key, serde_json::to_string(&job)?, expire)?;

if fall && job.status == Status::LOST {
panic!("LOST");
Expand Down