Skip to content

Commit 2c58757

Browse files
committed
Fix not working shutdown.
1 parent a7b1b8c commit 2c58757

File tree

4 files changed

+2
-11
lines changed

4 files changed

+2
-11
lines changed

atra/src/contexts/local/context.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ use text_processing::stopword_registry::StopWordRegistry;
5151
use text_processing::tf_idf::{Idf, Tf};
5252
use time::OffsetDateTime;
5353
use crate::contexts::local::LocalContextInitError;
54-
use crate::format::mime::MimeType;
5554

5655
/// The state of the app
5756
#[derive(Debug)]
@@ -258,7 +257,7 @@ impl SupportsLinkSeeding for LocalContext {
258257
.await?;
259258
}
260259
}
261-
ExtractedLink::Data { url, extraction_method, base } => {
260+
ExtractedLink::Data { .. } => {
262261
// let parsed = data_url::DataUrl::process(&url.url.as_str())?;
263262
//
264263
// /// TODO: this is expensive. But mime does not provide a better API

atra/src/crawl/crawler/result.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ pub mod test {
177177
Some(header),
178178
StatusCode::OK,
179179
None,
180-
None
181180
),
182181
Some(links),
183182
Some(encoding_rs::UTF_8),
@@ -207,7 +206,7 @@ pub mod test {
207206

208207
CrawlResult::new(
209208
OffsetDateTime::now_utc(),
210-
ResponseData::new(content, seed, None, StatusCode::OK, None, None),
209+
ResponseData::new(content, seed, None, StatusCode::OK, None),
211210
Some(links),
212211
None,
213212
AtraFileInformation::new(InterpretedProcessibleFileFormat::HTML, None, None),

atra/src/fetching/response.rs

-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use crate::url::UrlWithDepth;
1919
use reqwest::header::HeaderMap;
2020
use reqwest::StatusCode;
2121
use std::str::FromStr;
22-
use crate::format::mime::MimeType;
2322

2423
/// The response for a request
2524
#[derive(Debug)]
@@ -34,8 +33,6 @@ pub struct ResponseData {
3433
pub status_code: StatusCode,
3534
/// The final destination of the page if redirects were performed.
3635
pub final_redirect_destination: Option<String>,
37-
/// Set if it is a data url
38-
pub data_url_meta: Option<MimeType>
3936
}
4037

4138
impl ResponseData {
@@ -45,15 +42,13 @@ impl ResponseData {
4542
headers: Option<HeaderMap>,
4643
status_code: StatusCode,
4744
final_redirect_destination: Option<String>,
48-
data_url_meta: Option<MimeType>
4945
) -> Self {
5046
Self {
5147
content,
5248
url,
5349
headers,
5450
status_code,
5551
final_redirect_destination,
56-
data_url_meta
5752
}
5853
}
5954

@@ -64,7 +59,6 @@ impl ResponseData {
6459
headers: page_response.headers,
6560
status_code: page_response.status_code,
6661
final_redirect_destination: page_response.final_url,
67-
data_url_meta: None
6862
}
6963
}
7064

atra/src/sync/barrier.rs

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use std::num::NonZeroUsize;
1919
use std::sync::atomic::{AtomicUsize, Ordering};
2020
use tokio::select;
2121
use tokio_util::sync::CancellationToken;
22-
use crate::runtime::ShutdownChild;
2322
use crate::sync::CancellationTokenProvider;
2423

2524
/// The result of the [WorkerBarrier]

0 commit comments

Comments
 (0)