18
18
19
19
use Magento \DataExporter \Model \Batch \BatchGeneratorInterface ;
20
20
use Magento \DataExporter \Model \Batch \FeedSource \Generator as FeedSourceBatchGenerator ;
21
+ use Magento \DataExporter \Model \Indexer \Config as IndexerConfig ;
21
22
use Magento \DataExporter \Model \Logging \CommerceDataExportLoggerInterface ;
22
23
use Magento \DataExporter \Status \ExportStatusCodeProvider as ExportStatusCode ;
23
24
use Magento \Framework \App \ObjectManager ;
@@ -47,6 +48,8 @@ class FeedIndexProcessorCreateUpdate implements FeedIndexProcessorInterface
47
48
private BatchGeneratorInterface $ batchGenerator ;
48
49
private IndexStateProviderFactory $ indexStateProviderFactory ;
49
50
51
+ private Config $ indexerConfig ;
52
+
50
53
/**
51
54
* @param ResourceConnection $resourceConnection
52
55
* @param ExportProcessor $exportProcessor
@@ -59,6 +62,7 @@ class FeedIndexProcessorCreateUpdate implements FeedIndexProcessorInterface
59
62
* @param ProcessManagerFactory|null $processManagerFactory
60
63
* @param BatchGeneratorInterface|null $batchGenerator
61
64
* @param ?IndexStateProviderFactory $indexStateProviderFactory
65
+ * @param ?Config $indexerConfig
62
66
*
63
67
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
64
68
*/
@@ -73,7 +77,8 @@ public function __construct(
73
77
?DeletedEntitiesProviderInterface $ deletedEntitiesProvider = null ,
74
78
?ProcessManagerFactory $ processManagerFactory = null ,
75
79
?BatchGeneratorInterface $ batchGenerator = null ,
76
- ?IndexStateProviderFactory $ indexStateProviderFactory = null
80
+ ?IndexStateProviderFactory $ indexStateProviderFactory = null ,
81
+ ?IndexerConfig $ indexerConfig = null
77
82
) {
78
83
$ this ->resourceConnection = $ resourceConnection ;
79
84
$ this ->exportProcessor = $ exportProcessor ;
@@ -90,6 +95,8 @@ public function __construct(
90
95
ObjectManager::getInstance ()->get (FeedSourceBatchGenerator::class);
91
96
$ this ->indexStateProviderFactory = $ indexStateProviderFactory ??
92
97
ObjectManager::getInstance ()->get (IndexStateProviderFactory::class);
98
+ $ this ->indexerConfig = $ indexerConfig
99
+ ?? ObjectManager::getInstance ()->get (IndexerConfig::class);
93
100
}
94
101
95
102
/**
@@ -355,7 +362,8 @@ private function isSendNeeded(string $oldFeedHash, string $newFeedHash, int $fee
355
362
true
356
363
)
357
364
&& $ feedStatus !== ExportStatusCode::FAILED_ITEM_ERROR
358
- );
365
+ )
366
+ || $ this ->indexerConfig ->includeSubmittedInDryRun ();
359
367
}
360
368
361
369
/**
0 commit comments