File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ public function run()
152
152
echo $ e . "\n" ;
153
153
}
154
154
}
155
- } else if ($ this ->getArg ('reindex ' ) || $ this ->getArg ('reindexall ' )) {
155
+ } else if ($ this ->getArg ('reindex ' ) || $ this ->getArg ('reindexall ' ) || $ this -> getArg ( ' reindexallrequired ' ) ) {
156
156
if ($ this ->getArg ('reindex ' )) {
157
157
$ processes = $ this ->_parseIndexerString ($ this ->getArg ('reindex ' ));
158
158
} else {
@@ -162,6 +162,10 @@ public function run()
162
162
try {
163
163
Mage::dispatchEvent ('shell_reindex_init_process ' );
164
164
foreach ($ processes as $ process ) {
165
+ //reindex only if required
166
+ if ( $ this ->getArg ('reindexallrequired ' ) && $ process ->getStatus () == Mage_Index_Model_Process::STATUS_PENDING ) {
167
+ continue ;
168
+ }
165
169
/* @var $process Mage_Index_Model_Process */
166
170
try {
167
171
$ startTime = microtime (true );
@@ -204,6 +208,7 @@ public function usageHelp()
204
208
--reindex <indexer> Reindex Data
205
209
info Show allowed indexers
206
210
reindexall Reindex Data by all indexers
211
+ reindexallrequired Reindex Data only if required by all indexers
207
212
help This help
208
213
209
214
<indexer> Comma separated indexer codes or value "all" for all indexers
You can’t perform that action at this time.
0 commit comments