Replies: 2 comments 1 reply
|
Great question — I think cron and queue solve different layers of the problem. Maho's cron already has locking, and that's good. The current code locks a But that lock is schedule-level, not work-item-level. Take an And there's no per-item retry at the cron level either. The This pattern already shows up in several core modules:
PR #915 follows the same pattern. The async part isn't just a cron job — it has Each of these modules is solving (or ignoring) the same problem independently. A I wouldn't frame this as "queue instead of cron" — the simple version can still be database-backed and processed by cron. The difference is what sits between the cron runner and the actual work. TL;DR: |
Uh oh!
There was an error while loading. Please reload this page.
Looking at PR #915's AI module, I noticed the async task queue (
Mage::helper('ai')->submitTask()+ cron processing). It got me thinking — that pattern could be useful beyond AI tasks.There are plenty of other use cases that could benefit from the same async processing:
I've built something similar before for OpenMage (redis-queue), mostly for async tracking.
A generic
Maho_Queuecould start simple — database-backed by default, cron as the worker — and scale to Redis or other backends later.The question: Is there enough demand to extract this as a reusable core layer, or is it better to keep async patterns module-specific for now?
All reactions