From a9a3c3e8945dd11a0d81f64a5629876397a1e51d Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 25 Aug 2023 15:11:00 +0700 Subject: Update sync solr function --- indoteknik_custom/views/product_product.xml | 8 ++++++++ indoteknik_custom/views/product_template.xml | 14 ++++++++++++-- indoteknik_custom/views/website_categories_homepage.xml | 6 ++++-- 3 files changed, 24 insertions(+), 4 deletions(-) (limited to 'indoteknik_custom/views') diff --git a/indoteknik_custom/views/product_product.xml b/indoteknik_custom/views/product_product.xml index d3ef3e15..3a10b4e0 100644 --- a/indoteknik_custom/views/product_product.xml +++ b/indoteknik_custom/views/product_product.xml @@ -12,5 +12,13 @@ + + + Sync to solr + + + code + model.sync_to_solr() + \ No newline at end of file diff --git a/indoteknik_custom/views/product_template.xml b/indoteknik_custom/views/product_template.xml index 82b7ce4d..bbbcc4e1 100755 --- a/indoteknik_custom/views/product_template.xml +++ b/indoteknik_custom/views/product_template.xml @@ -9,11 +9,13 @@ - - + + + + @@ -74,5 +76,13 @@ + + + Sync to solr + + + code + model.sync_to_solr() + \ No newline at end of file diff --git a/indoteknik_custom/views/website_categories_homepage.xml b/indoteknik_custom/views/website_categories_homepage.xml index 0a3f684b..bd64f201 100644 --- a/indoteknik_custom/views/website_categories_homepage.xml +++ b/indoteknik_custom/views/website_categories_homepage.xml @@ -16,6 +16,7 @@ + @@ -33,6 +34,7 @@ + @@ -49,8 +51,8 @@ - - Sync To Solr + + Sync to solr code -- cgit v1.2.3 From 315b832420eb8314e809b1c0f549304d423b45f3 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Sat, 26 Aug 2023 12:13:28 +0700 Subject: Create apache solr queue and implement to product.template and website.categories.homepage --- indoteknik_custom/views/apache_solr_queue.xml | 74 ++++++++++++++++++++++ indoteknik_custom/views/product_product.xml | 2 +- indoteknik_custom/views/product_template.xml | 2 +- .../views/website_categories_homepage.xml | 2 +- 4 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 indoteknik_custom/views/apache_solr_queue.xml (limited to 'indoteknik_custom/views') diff --git a/indoteknik_custom/views/apache_solr_queue.xml b/indoteknik_custom/views/apache_solr_queue.xml new file mode 100644 index 00000000..092871d6 --- /dev/null +++ b/indoteknik_custom/views/apache_solr_queue.xml @@ -0,0 +1,74 @@ + + + apache.solr.queue.tree + apache.solr.queue + + + + + + + + + + + + + + + apache.solr.queue.search + apache.solr.queue + primary + + + + + + + + + + + + Solr Queue + apache.solr.queue + + {'search_default_active_queue': 1} + tree + + + + + + Execute + + + code + records.execute_queue() + + + + + Solr Queue: Process + 6 + minutes + -1 + + + model.process_queue_item(limit=100) + code + 55 + True + + + \ No newline at end of file diff --git a/indoteknik_custom/views/product_product.xml b/indoteknik_custom/views/product_product.xml index 3a10b4e0..6d547712 100644 --- a/indoteknik_custom/views/product_product.xml +++ b/indoteknik_custom/views/product_product.xml @@ -18,7 +18,7 @@ code - model.sync_to_solr() + model.action_sync_to_solr() \ No newline at end of file diff --git a/indoteknik_custom/views/product_template.xml b/indoteknik_custom/views/product_template.xml index bbbcc4e1..b2939867 100755 --- a/indoteknik_custom/views/product_template.xml +++ b/indoteknik_custom/views/product_template.xml @@ -82,7 +82,7 @@ code - model.sync_to_solr() + model.action_sync_to_solr() \ No newline at end of file diff --git a/indoteknik_custom/views/website_categories_homepage.xml b/indoteknik_custom/views/website_categories_homepage.xml index bd64f201..aa54ca7a 100644 --- a/indoteknik_custom/views/website_categories_homepage.xml +++ b/indoteknik_custom/views/website_categories_homepage.xml @@ -56,7 +56,7 @@ code - model.sync_to_solr() + model.action_sync_to_solr()