It also depends on what Sitecore Commerce version you are using.
You can follow the below doc from the Sitecore site - https://doc.sitecore.com/developers/93/sitecore-experience-commerce/en/commerce-engine-minions.html
It says -
The MinionPolicy
includes an Entities
parameter that specifies the entity types that the minion processes.
Before a minion runs, it checks to see if any other minions that are running are configured to process the same entity types as it processes. If another such minion is processing the same entity types, the minion waits until that first minion has finished running before starting its own process. This prevents concurrency errors that arise if two minions attempt to update the same entity at the same time.
For example, before the FullIndexMinion
runs, it checks to make sure that neither the DeleteIndexDocumentsMinion
nor the IncrementalIndexMinion
(both of which work with the same entity types) are running at the same time, to avoid corrupted data in the indexes.
The following shows an example of an indexing minion policy:
{
"$type": "Sitecore.Commerce.Core.MinionPolicy, Sitecore.Commerce.Core",
"WakeupInterval": "00:05:00",
"ListsToWatch": [
"CatalogItemsIndex"
],
"FullyQualifiedName": "Sitecore.Commerce.Plugin.Search.IncrementalIndexMinion, Sitecore.Commerce.Plugin.Search",
"ItemsPerBatch": 1000,
"SleepBetweenBatches": 500,
"Entities": {
"$type": "System.Collections.Generic.List`1[[System.String, mscorlib]], mscorlib",
"$values": [
"Sitecore.Commerce.Plugin.Catalog.Catalogs, Sitecore.Commerce.Plugin.Catalog",
"Sitecore.Commerce.Plugin.Catalog.Category, Sitecore.Commerce.Plugin.Catalog",
"Sitecore.Commerce.Plugin.Catalog.SellableItem, Sitecore.Commerce.Plugin.Catalog"
]
}
},