I'm running some script that changed some attribute values for some products.
Because of performance reasons, I split this into batches.
But each time I'm done with a batch the reindexing starts for the products that belong to that batch. Indexes are set to "real time".
I want to disable the reindexing during the execution of my script.
But I don't want to set the reindex mode to 'schedule' because my script can take a while and any other operations done via admin need to still trigger the indexing for those specific products.
How can I tell magento at the start of my script "Don't reindex anything during this script, no matter on how the index mode is set!!" ?
Note: The script is a magento command executed either via cli or cron.