-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ YC-887 ] Improve modules/plugin registration mechanism
- reworked cron triggers extension
- Loading branch information
1 parent
6a54ff3
commit 52ad72f
Showing
6 changed files
with
118 additions
and
7 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
55 changes: 55 additions & 0 deletions
55
search/search-lucene-embeded/src/main/resources/websupport-cronjob-ext.xml
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright 2009 Denys Pavlov, Igor Azarnyi | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.springframework.org/schema/beans | ||
http://www.springframework.org/schema/beans/spring-beans.xsd"> | ||
|
||
<import resource="core-index-cronjob.xml"/> | ||
|
||
<bean id="ftCronExtension" parent="webCronScheduleTriggers" class="org.springframework.beans.factory.config.ListFactoryBean"> | ||
<property name="sourceList"> | ||
<list merge="true"> | ||
<!-- | ||
reindexDiscontinuedProductsTrigger and productsGlobalIndexProcessorTrigger are two alternatives | ||
that perform full reindex. | ||
Only one of these should be enabled. reindexDiscontinuedProductsTrigger is aimed at locating | ||
items that are no longer available and then removing them out of the search index. | ||
productsGlobalIndexProcessorTrigger simply does full reindex (that includes removing outdated). | ||
The enable/disable should be controlled by cron schedule set to far future (say 2099). By default | ||
only reindexDiscontinuedProductsTrigger is set to 5am daily and productsGlobalIndexProcessorTrigger | ||
is set to 2099 (i.e. disabled) | ||
--> | ||
<ref bean="reindexDiscontinuedProductsTrigger" /> | ||
<ref bean="productsGlobalIndexProcessorTrigger" /> | ||
<!-- | ||
Cron job that detect inventory changes between job runs and then | ||
re-indexes the SKU corresponding to those inventory items. | ||
This is needed for delta changes updates in index for example when | ||
inventory is updated either due to inventory update or changes caused | ||
by customer order | ||
--> | ||
<ref bean="productInventoryChangedProcessorJobCronTrigger" /> | ||
</list> | ||
</property> | ||
</bean> | ||
|
||
</beans> | ||
|
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