|
@@ -130,6 +130,9 @@ export class WebshopScraper {
|
|
|
for (const content of shippingContent) {
|
|
for (const content of shippingContent) {
|
|
|
const result = this.db.saveContent(shopId, 'shipping', content.url, content.content, content.title);
|
|
const result = this.db.saveContent(shopId, 'shipping', content.url, content.content, content.title);
|
|
|
|
|
|
|
|
|
|
+ // Skip embedding and webhooks if content was skipped (duplicate hash in another category)
|
|
|
|
|
+ if (result.skipped) continue;
|
|
|
|
|
+
|
|
|
// Add to embedding batch if workflow is available
|
|
// Add to embedding batch if workflow is available
|
|
|
if (this.embeddingWorkflow) {
|
|
if (this.embeddingWorkflow) {
|
|
|
embeddingBatch.push({
|
|
embeddingBatch.push({
|
|
@@ -162,6 +165,9 @@ export class WebshopScraper {
|
|
|
for (const content of contactsContent) {
|
|
for (const content of contactsContent) {
|
|
|
const result = this.db.saveContent(shopId, 'contacts', content.url, content.content, content.title);
|
|
const result = this.db.saveContent(shopId, 'contacts', content.url, content.content, content.title);
|
|
|
|
|
|
|
|
|
|
+ // Skip embedding and webhooks if content was skipped (duplicate hash in another category)
|
|
|
|
|
+ if (result.skipped) continue;
|
|
|
|
|
+
|
|
|
// Add to embedding batch if workflow is available
|
|
// Add to embedding batch if workflow is available
|
|
|
if (this.embeddingWorkflow) {
|
|
if (this.embeddingWorkflow) {
|
|
|
embeddingBatch.push({
|
|
embeddingBatch.push({
|
|
@@ -194,6 +200,9 @@ export class WebshopScraper {
|
|
|
for (const content of termsContent) {
|
|
for (const content of termsContent) {
|
|
|
const result = this.db.saveContent(shopId, 'terms', content.url, content.content, content.title);
|
|
const result = this.db.saveContent(shopId, 'terms', content.url, content.content, content.title);
|
|
|
|
|
|
|
|
|
|
+ // Skip embedding and webhooks if content was skipped (duplicate hash in another category)
|
|
|
|
|
+ if (result.skipped) continue;
|
|
|
|
|
+
|
|
|
// Add to embedding batch if workflow is available
|
|
// Add to embedding batch if workflow is available
|
|
|
if (this.embeddingWorkflow) {
|
|
if (this.embeddingWorkflow) {
|
|
|
embeddingBatch.push({
|
|
embeddingBatch.push({
|
|
@@ -226,6 +235,9 @@ export class WebshopScraper {
|
|
|
for (const content of faqContent) {
|
|
for (const content of faqContent) {
|
|
|
const result = this.db.saveContent(shopId, 'faq', content.url, content.content, content.title);
|
|
const result = this.db.saveContent(shopId, 'faq', content.url, content.content, content.title);
|
|
|
|
|
|
|
|
|
|
+ // Skip embedding and webhooks if content was skipped (duplicate hash in another category)
|
|
|
|
|
+ if (result.skipped) continue;
|
|
|
|
|
+
|
|
|
// Add to embedding batch if workflow is available
|
|
// Add to embedding batch if workflow is available
|
|
|
if (this.embeddingWorkflow) {
|
|
if (this.embeddingWorkflow) {
|
|
|
embeddingBatch.push({
|
|
embeddingBatch.push({
|