Skip to content

Commit 0ca6b5b

Browse files
committed
feature: special logic to skip sending message to firecrawl
1 parent 745d4ea commit 0ca6b5b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

server/src/operators/crawl_operator.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,13 @@ pub async fn crawl(
127127
redis_pool: web::Data<RedisPool>,
128128
dataset_id: uuid::Uuid,
129129
) -> Result<uuid::Uuid, ServiceError> {
130-
let scrape_id = crawl_site(crawl_options.clone())
131-
.await
132-
.map_err(|err| ServiceError::BadRequest(format!("Could not crawl site: {}", err)))?;
130+
let scrape_id = if crawl_options.is_shopify.unwrap_or(false) {
131+
uuid::Uuid::nil()
132+
} else {
133+
crawl_site(crawl_options.clone())
134+
.await
135+
.map_err(|err| ServiceError::BadRequest(format!("Could not crawl site: {}", err)))?
136+
};
133137

134138
create_crawl_request(crawl_options, dataset_id, scrape_id, pool, redis_pool).await?;
135139

0 commit comments

Comments
 (0)