hirale/openmage-async-index

Asynchronous Mage index event draining for OpenMage and Maho, using hirale/queue.

Maintainers

Package info

github.com/hirale/openmage-async-index

Type:magento-module

pkg:composer/hirale/openmage-async-index

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.2.0 2026-06-10 15:09 UTC

This package is auto-updated.

Last update: 2026-06-10 19:45:50 UTC


README

Asynchronous core index event and full reindex orchestration for OpenMage and Maho.

The module keeps index_event and index_process_event as the durable source of truth, then uses hirale/queue to wake a background worker. Handlers are at least once, so the DB-backed pending event state is always used to decide what work remains.

Install

Requires hirale/queue ^3.0 (pulled in automatically).

Maho (26.5+):

composer require hirale/openmage-async-index

OpenMage (20.17+, PHP 8.3+) — one-time tweaks first; details in the hirale/queue README:

composer config platform.php 8.3
composer config allow-plugins.hirale/magento-module-installer true
composer require hirale/magento-module-installer hirale/openmage-async-index

For local development, add a path repository next to the application:

{
    "repositories": [
        {
            "name": "openmage-async-index",
            "type": "path",
            "url": "../openmage-async-index",
            "options": {
                "symlink": true
            }
        }
    ]
}

Runtime

Enable Hirale > Async Index only after Hirale > Queue is configured and working. When async index is disabled, core indexing behaves as it did before.

When enabled, the module automatically switches manual index processes to real_time so Maho records index events. The original modes are stored and are restored when async index is disabled.

The queue job only wakes the runner. The runner scans pending index events and require_reindex processes from the database, processes them in batches, and publishes continuation jobs while work remains.

Full reindex runs are also queued. Product-backed indexers are split into product ID batches. Indexers that cannot be safely split by product still run through the same async full reindex coordinator as a global batch unit, so admin and CLI calls do not perform the heavy full reindex inside the request process while async index is enabled.