Introduction

Please refer to the documentation about batch sizes of the output-module for a general overview about batches and batch sizes.

Batch Sizes

As the module-flow overview explained there are two relevant phases involved in uploading media:

  • First, the module analyzes every document for its assets and generates media operations (affected by the jobGeneration batch size)
  • After the operations are generated they are executed (affected by the jobExecution batch size)

For both steps you can configure a batch size:

{
    "batchSizes": {
        "jobGeneration": 500,
        "jobExecution": 10
    }
}

Job Generation

A media job / media operation is an operation that is performed by the module to synchronize the assets of a document with the media files in Shopware - e.g. by creating, updating or deleting media files.

The media operations are generated by analyzing each document for its assets. This is done in parallel by run handlers. This batch size determines how many documents a run handler analyzes per message.

Example: A batch size of 500 causes a run handler to analyze 500 products/categories/... for its assets. So the handler generates media operations for 500 documents per message.

Job Execution

The generated media operations are executed in parallel by run handlers. A handler will take a document, fetch all operations that were generated for this particular document and execute those operations.

This batch size determines for how many documents a handler will execute the operations.

Note that this batch sizes determines for how many documents the media operations are executed. This does not determine how many operations are executed per message. Example: If there are 10 documents with 1 job each this handler will execute 10 jobs. If there are 10 documents with 10 jobs each this will execute 100 jobs.