add scrapper TODO: tie stream name to post title

This commit is contained in:
Denis-Cosmin Nutiu 2025-01-04 18:25:40 +02:00
parent ab800110b2
commit 5da87b8e2a

View file

@ -97,6 +97,7 @@ async fn main() -> Result<(), anyhow::Error> {
info!("Received post {:?}", news_post); info!("Received post {:?}", news_post);
if news_post.is_complete() { if news_post.is_complete() {
let title = news_post.title.clone().unwrap(); let title = news_post.title.clone().unwrap();
// TODO: add stream name in the flag key
if !redis_service.is_key_flagged(&title).await { if !redis_service.is_key_flagged(&title).await {
let published = redis_service let published = redis_service
.publish(&args.redis_stream_name, &news_post) .publish(&args.redis_stream_name, &news_post)