diff --git a/src/bin/delta-generator-client.rs b/src/bin/delta-generator-client.rs index 3ac1e8f..06be9b2 100644 --- a/src/bin/delta-generator-client.rs +++ b/src/bin/delta-generator-client.rs @@ -72,7 +72,6 @@ gpg-verify-summary=false struct Manager { fs_pool: FsPool, url: String, - cdn_url: Option, token: String, client: Option>, capacity: u32, @@ -108,7 +107,6 @@ impl Manager { let capacity = manager.capacity; let repo = manager.repo.clone(); let url = manager.url.clone(); - let cdn_url = manager.cdn_url.clone(); let token = manager.token.clone(); let fs_pool = manager.fs_pool.clone(); let (sink, stream) = framed.split(); @@ -119,7 +117,6 @@ impl Manager { writer: SinkWrite::new(sink, ctx), manager: addr, url, - cdn_url, token, capacity, repo, @@ -161,7 +158,6 @@ struct DeltaClient { writer: SinkWrite>>, manager: Addr, url: String, - cdn_url: Option, token: String, capacity: u32, repo: PathBuf, @@ -394,12 +390,6 @@ impl DeltaClient { let path2 = self.repo.clone(); let delta2 = delta.clone(); let base_url = self.url.clone(); - // if we have set a CDN_URL, let's use it for the download. - let cdn_url = if let Some(ref cdn_url) = self.cdn_url { - cdn_url.clone() - } else { - url - }; let token = self.token.clone(); let reponame = repo; let fs_pool = self.fs_pool.clone(); @@ -411,7 +401,7 @@ impl DeltaClient { .read() .into_actor(self) .then(move |guard, client, _ctx| { - pull_and_generate_delta_async(&path, &cdn_url, &delta) + pull_and_generate_delta_async(&path, &url, &delta) .and_then(move |_| { upload_delta(fs_pool, base_url, token, reponame, path2, delta2) }) @@ -480,8 +470,6 @@ fn main() { let token = env::var("REPO_TOKEN").expect("No token, set REPO_TOKEN in env or .env"); let url = env::var("MANAGER_URL").unwrap_or_else(|_| "http://127.0.0.1:8080".to_string()); - // CDN_URL to download delta from. By default same as MANAGER_URL. - let cdn_url = env::var("CDN_URL").ok(); let capacity: u32 = env::var("CAPACITY") .map(|s| s.parse().expect("Failed to parse $CAPACITY")) .unwrap_or_else(|_| num_cpus::get() as u32); @@ -498,7 +486,6 @@ fn main() { let _addr = Manager { fs_pool: FsPool::default(), url, - cdn_url, token, client: None, capacity,