feat: queue processor — scheduled task + page-load fallback (#11)
Universal: Auto Version Bump / Version Bump (push) Has been cancelled
Update Server / Update updates.xml (push) Has been cancelled

Three-pronged queue processing:

1. Joomla Scheduled Task (preferred): New plg_task_mokojoomcross plugin
   registers "MokoJoomCross - Process Queue" task type. Admin creates
   a scheduled task in System → Scheduled Tasks with desired interval.

2. Page-load fallback: System plugin onAfterRender with configurable
   throttle interval. Runs on backend, frontend, or both. Small batch
   size (5) to avoid slowing page loads.

3. Both can run simultaneously — QueueProcessor uses DB-based lock
   to prevent concurrent execution (120s safety timeout).

Shared QueueProcessor helper handles:
- Queued post dispatch to service plugins
- Failed post retry with configurable max retries + delay
- Scheduled post firing (when scheduled_at <= now)
- Log cleanup based on retention period

Dashboard shows warning banner when page-load processing is active,
recommending switch to Joomla Scheduled Tasks for production.

Config options: queue_processing (scheduler/pageload/both),
pageload_client (admin/site/both), pageload_interval (seconds).

Authored-by: Moko Consulting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan Miller
2026-05-28 13:19:21 -05:00
parent 04e7720268
commit 9bbf2a74fb
20 changed files with 697 additions and 0 deletions
+1
View File
@@ -63,6 +63,7 @@ class Pkg_MokoJoomCrossInstallerScript
['system', 'mokojoomcross'],
['content', 'mokojoomcross'],
['webservices', 'mokojoomcross'],
['task', 'mokojoomcross'],
];
foreach ($corePlugins as [$folder, $element]) {