[TikiWiki-commits] [Git][tikiwiki/tiki][master] [NEW] Implement background job queue system for PDF and instance operations

"SoftStart Code \(@softstartcode\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68cbbd82a7219_2cdec104315b@gitlab-sidekiq-low-urgency-cpu-bound-v2-67d9d88d6c-jksd2.mail>

SoftStart Code pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
ce192df8 by Sandeep D at 2025-09-18T07:58:09+00:00
[NEW] Implement background job queue system for PDF and instance operations
---
* [NEW] Implement background job queue system for PDF and instance operations

- Introduced a general-purpose job queue system for executing long-running tasks in the background.
- Queue system features:
  - Task queue table supports serialization of task objects and user association.
  - Tasks can be uniquely identified via task Id to track their status and result.
  - Task types can be filtered for monitoring (e.g. "create_instance", "generate_pdf").
  - Output, status, and result payloads are stored in DB for later retrieval.
- Added new CLI command `queue:process`:
  - `queue:process` runs all queued tasks once and exits.
  - `queue:process --loop` continuously polls the queue every 0.2s for new tasks.
  - Marks task as running, executes, then stores output and marks as completed.
- Job lifecycle:
  - `pending` ➝ `running` ➝ `completed` or `failed`.
  - Output is captured and stored in DB.
- Added API/CLI endpoints to:
  - Queue a task.
  - Check status by task ID or by task type.
  - Fetch task output/result.

- This implementation lays the groundwork for async background task processing across Tiki, removing long-running operations from HTTP requests and enabling scalable execution via CLI.

See merge request tikiwiki/tiki!8581

- - - - -


39 changed files:

- db/config/controllers.xml
- db/tiki.sql
- db/tiki_convert_myisam_to_innodb.sql
- + installer/schema/20250829_add_new_table_for_queued_tasks_tiki.sql
- + lib/core/Search/SearchIndexRebuilder.php
- lib/core/Services/Manager/Controller.php
- + lib/core/Services/QueueManager/QueueManagerController.php
- lib/core/Services/Search/Controller.php
- + lib/core/TaskQueue/Exception/Exception.php
- + lib/core/TaskQueue/Exception/QueueManagerException.php
- + lib/core/TaskQueue/QueueManager.php
- + lib/core/TaskQueue/QueuedInterface.php
- + lib/core/TaskQueue/QueuedTaskBanner.php
- + lib/core/TaskQueue/QueuedTaskSettings.php
- + lib/core/TaskQueue/Tasks/CreateInstanceTask.php
- + lib/core/TaskQueue/Tasks/PdfGenerationTask.php
- + lib/core/TaskQueue/Tasks/QueuedAbstractTask.php
- + lib/core/TaskQueue/Tasks/QueuedTaskInterface.php
- + lib/core/TaskQueue/Tasks/RebuildIndexTask.php
- lib/core/Tiki/Command/ConsoleApplicationBuilder.php
- lib/core/Tiki/Command/IndexRebuildCommand.php
- + lib/core/Tiki/Command/TaskQueueProcessCommand.php
- lib/jquery_tiki/tiki-jquery.js
- lib/prefs/feature.php
- lib/smarty_tiki/Extension/SmartyTikiExtension.php
- + lib/smarty_tiki/FunctionHandler/QueuedTasksBanner.php
- + lib/test/TaskQueue/QueueManagerTest.php
- templates/admin/admin_navbar_menu.tpl
- templates/admin/include_anchors.tpl
- templates/admin/include_features.tpl
- templates/admin/include_general.tpl
- templates/layouts/social/layout_view.tpl
- templates/modules/mod-adminbar.tpl
- templates/modules/mod-quickadmin.tpl
- + templates/queuedtasks/alert.tpl
- + templates/queuedtasks/tiki-admin_queued_banner.tpl
- + templates/queuedtasks/tiki-admin_queued_tasks.tpl
- + tiki-admin_queued_tasks.php
- tiki-print.php


The diff was not included because it is too large.


View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/ce192df8b45097508b93530481e4fb91b863d8fe

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/ce192df8b45097508b93530481e4fb91b863d8fe
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.