summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/solr/apache_solr.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2023-09-13 11:42:17 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2023-09-13 11:42:17 +0700
commit7c67529ed27e32d32a6ddc4cd3fe296ce0d7bca2 (patch)
tree1b343cd085e472379426d159c7b8dc595af2d240 /indoteknik_custom/models/solr/apache_solr.py
parent70a8e601fb661398bd7f6b826b4851bd915249c4 (diff)
parent8cd5ba78d36ebb399a69e87aa2bdd76b01bf5504 (diff)
Merge branch 'production' of bitbucket.org:altafixco/indoteknik-addons into production
Diffstat (limited to 'indoteknik_custom/models/solr/apache_solr.py')
-rw-r--r--indoteknik_custom/models/solr/apache_solr.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/solr/apache_solr.py b/indoteknik_custom/models/solr/apache_solr.py
index 98004f00..eb02cb57 100644
--- a/indoteknik_custom/models/solr/apache_solr.py
+++ b/indoteknik_custom/models/solr/apache_solr.py
@@ -53,6 +53,10 @@ class ApacheSolr(models.Model):
new_dict[cleaned_key] = value
return new_dict
+ def action_commit_collections(self, collections=[]):
+ for collection in collections:
+ self.connect(collection).commit(waitFlush=True, waitSearcher=True)
+
def _update_stock_product_to_solr(self, limit=10000):
current_time = datetime.now()
delta_time = current_time - timedelta(days=3)