-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rely on indexer when syncing inventory
This commit - subscribes our indexer to changes on various product-related tables - hooks existing single update logic to indexer interface - removes observer - removes the mess of txt file driving the sync logic - changes our cron job to run once per day, at 4am and invalidating the index - makes this time configurable through user interface - hooks the reindex now button to index invalidation
- Loading branch information
Showing
13 changed files
with
82 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<?xml version="1.0"?> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd"> | ||
<group id="default"> | ||
<job name="luigisbox_cron_checker" instance="LuigisBox\SearchSuite\Cron\Checker" method="execute"> | ||
<schedule>* * * * *</schedule> | ||
<job name="luigisbox_idx_invalidator" instance="LuigisBox\SearchSuite\Cron\IndexInvalidator" method="execute"> | ||
<config_path>luigisboxsearch_settings/settings/cron_schedule</config_path> | ||
</job> | ||
</group> | ||
</config> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Indexer/etc/indexer.xsd"> | ||
<indexer id="luigisbox_index_product" view_id="luigisbox_index_product" class="LuigisBox\SearchSuite\Model\Indexer\Product"> | ||
<title translate="true">Luigi's Box Search Results</title> | ||
<indexer id="luigisbox_reindex" view_id="luigisbox_reindex" class="LuigisBox\SearchSuite\Model\Indexer\Product"> | ||
<title translate="true">Luigi's Box Reindexer</title> | ||
<description translate="true"> | ||
Rebuild Luigi's Box catalog index. | ||
Reindex products in Luigi's Box catalog index. | ||
</description> | ||
</indexer> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Mview/etc/mview.xsd"> | ||
<view id="luigisbox_index_product" class="LuigisBox\SearchSuite\Model\Indexer\Product" group="indexer"> | ||
<view id="luigisbox_reindex" class="LuigisBox\SearchSuite\Model\Indexer\Product" group="indexer"> | ||
<subscriptions> | ||
<table name="catalog_product_entity" entity_column="entity_id" /> | ||
<table name="catalog_product_entity_datetime" entity_column="entity_id" /> | ||
<table name="catalog_product_entity_decimal" entity_column="entity_id" /> | ||
<table name="catalog_product_entity_gallery" entity_column="entity_id" /> | ||
<table name="catalog_product_entity_int" entity_column="entity_id" /> | ||
<table name="catalog_product_entity_media_gallery_value" entity_column="entity_id" /> | ||
<table name="catalog_product_entity_text" entity_column="entity_id" /> | ||
<table name="catalog_product_entity_tier_price" entity_column="entity_id" /> | ||
<table name="catalog_product_entity_varchar" entity_column="entity_id" /> | ||
</subscriptions> | ||
</view> | ||
</config> | ||
</config> |