Comment out tagging code from the rake seeder

This commit is contained in:
Olivier 'reivilibre' 2022-03-20 21:51:33 +00:00
parent 179f04b2dd
commit 173b8a4de1
1 changed files with 5 additions and 5 deletions

View File

@ -1,13 +1,11 @@
use clap::Parser; use clap::Parser;
use std::borrow::{Borrow, BorrowMut}; use std::borrow::{Borrow, BorrowMut};
use std::collections::BTreeSet;
use env_logger::Env; use env_logger::Env;
use anyhow::{anyhow, bail, Context}; use anyhow::{anyhow, bail, Context};
use smartstring::alias::CompactString;
use colour::{cyan, dark_green_ln, dark_yellow, green, green_ln, yellow, yellow_ln}; use colour::{dark_green_ln, dark_yellow, green, yellow_ln};
use reqwest::{Client, Url}; use reqwest::{Client, Url};
use std::path::PathBuf; use std::path::PathBuf;
use tokio::sync::mpsc; use tokio::sync::mpsc;
@ -81,7 +79,7 @@ pub async fn main() -> anyhow::Result<()> {
pub struct Seed { pub struct Seed {
url: UrlOrUrlPattern, url: UrlOrUrlPattern,
tags: BTreeSet<CompactString>, // TODO These make more sense at the indexer stage. tags: BTreeSet<CompactString>,
} }
/// Either a URL or a URL prefix. /// Either a URL or a URL prefix.
@ -109,15 +107,17 @@ async fn seed_loader(seed_files: Vec<PathBuf>, send: &Sender<Seed>) -> anyhow::R
Ok(seedblocks) => { Ok(seedblocks) => {
for seedblock in seedblocks { for seedblock in seedblocks {
for seed in seedblock.seeds { for seed in seedblock.seeds {
/*
let tags: BTreeSet<CompactString> = seedblock let tags: BTreeSet<CompactString> = seedblock
.tags .tags
.iter() .iter()
.chain(seed.extra_tags.iter()) .chain(seed.extra_tags.iter())
.cloned() .cloned()
.collect(); .collect();
*/
send.send(Seed { send.send(Seed {
url: seed_url_parse_pattern(seed.url), url: seed_url_parse_pattern(seed.url),
tags, // tags,
}) })
.await .await
.map_err(|_| anyhow!("Seed receiver shut down prematurely"))?; .map_err(|_| anyhow!("Seed receiver shut down prematurely"))?;