remove debugging print

This commit is contained in:
Rob Ede 2020-10-01 11:24:51 +01:00
parent b7b25b7cb7
commit 4642560868
No known key found for this signature in database
GPG key ID: C2A3B36E841A91E6
4 changed files with 8 additions and 25 deletions

View file

@ -201,8 +201,6 @@ impl Engine {
) -> Result<AnalyzeDependenciesOutcome, Error> { ) -> Result<AnalyzeDependenciesOutcome, Error> {
let start = Instant::now(); let start = Instant::now();
println!("analyze deps");
let query_response = self let query_response = self
.query_crate .query_crate
.lock() .lock()

View file

@ -103,9 +103,6 @@ where
}; };
let uri = format!("{}/master/{}", CRATES_INDEX_BASE_URI, path); let uri = format!("{}/master/{}", CRATES_INDEX_BASE_URI, path);
println!("analyze from uri {:?}", &uri);
let uri = uri.parse::<Uri>().expect("TODO: MAP ERROR PROPERLY"); let uri = uri.parse::<Uri>().expect("TODO: MAP ERROR PROPERLY");
let request = Request::get(uri.clone()) let request = Request::get(uri.clone())
@ -133,7 +130,7 @@ where
.lines() .lines()
.map(|s| s.trim()) .map(|s| s.trim())
.filter(|s| !s.is_empty()) .filter(|s| !s.is_empty())
.map(|s| serde_json::from_str::<RegistryPackage>(s)) .map(serde_json::from_str)
.collect::<Result<_, _>>(), .collect::<Result<_, _>>(),
) )
.err_into() .err_into()

View file

@ -38,16 +38,16 @@ where
fn call(&mut self, req: (RepoPath, RelativePathBuf)) -> Self::Future { fn call(&mut self, req: (RepoPath, RelativePathBuf)) -> Self::Future {
let (repo_path, path) = req; let (repo_path, path) = req;
let uri = match &repo_path.site { let uri = match &repo_path.site {
&RepoSite::Github => github::get_manifest_uri(&repo_path, &path), RepoSite::Github => github::get_manifest_uri(&repo_path, &path),
&RepoSite::Gitlab => gitlab::get_manifest_uri(&repo_path, &path), RepoSite::Gitlab => gitlab::get_manifest_uri(&repo_path, &path),
&RepoSite::Bitbucket => bitbucket::get_manifest_uri(&repo_path, &path), RepoSite::Bitbucket => bitbucket::get_manifest_uri(&repo_path, &path),
}; };
if let Err(error) = uri { let uri = match uri {
return Box::pin(err(error)); Ok(uri) => uri,
} Err(error) => return Box::pin(err(error)),
};
let uri = uri.unwrap();
let request = Request::get(uri.clone()) let request = Request::get(uri.clone())
.header(USER_AGENT, "deps.rs") .header(USER_AGENT, "deps.rs")
.body(Body::empty()) .body(Body::empty())

View file

@ -100,9 +100,7 @@ impl App {
} }
} }
&Route::CrateStatus(format) => { &Route::CrateStatus(format) => {
println!("route");
if *req.method() == Method::GET { if *req.method() == Method::GET {
println!("get");
return self return self
.crate_status(req, route_match.params, logger, format) .crate_status(req, route_match.params, logger, format)
.await; .await;
@ -288,8 +286,6 @@ impl App {
let crate_path_result = CratePath::from_parts(name, version); let crate_path_result = CratePath::from_parts(name, version);
println!("crate path {:?}", &crate_path_result);
match crate_path_result { match crate_path_result {
Err(err) => { Err(err) => {
error!(logger, "error: {}", err); error!(logger, "error: {}", err);
@ -301,15 +297,11 @@ impl App {
Ok(response) Ok(response)
} }
Ok(crate_path) => { Ok(crate_path) => {
println!("crate path ok");
let analyze_result = server let analyze_result = server
.engine .engine
.analyze_crate_dependencies(crate_path.clone()) .analyze_crate_dependencies(crate_path.clone())
.await; .await;
println!("results analyzed {:?}", &analyze_result);
match analyze_result { match analyze_result {
Err(err) => { Err(err) => {
error!(logger, "error: {}", err); error!(logger, "error: {}", err);
@ -321,16 +313,12 @@ impl App {
Ok(response) Ok(response)
} }
Ok(analysis_outcome) => { Ok(analysis_outcome) => {
println!("analysis ok");
let response = App::status_format_analysis( let response = App::status_format_analysis(
Some(analysis_outcome), Some(analysis_outcome),
format, format,
SubjectPath::Crate(crate_path), SubjectPath::Crate(crate_path),
); );
println!("response created");
Ok(response) Ok(response)
} }
} }