[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] queued-tasks: Make the new queued tasks feature obey the pref

"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6938bfdbd9a19_2a17e10c9677@gitlab-sidekiq-low-urgency-cpu-bound-v2-8495f9c59-mkvtl.mail>

luci pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
3b51dbb3 by Jonny Bradley at 2025-12-10T00:25:23+00:00
[FIX] queued-tasks: Make the new queued tasks feature obey the pref
---
* [FIX] queued-tasks: Make the new queued tasks feature (from !8581) obey the feature_queued_tasks preference so it can be disabled

See merge request tikiwiki/tiki!9204

- - - - -


3 changed files:

- lib/core/Services/QueueManager/QueueManagerController.php
- lib/jquery_tiki/tiki-jquery.js
- lib/setup/javascript.php


Changes:

=====================================
lib/core/Services/QueueManager/QueueManagerController.php
=====================================
@@ -24,7 +24,13 @@ class QueueManagerController
 
     public function actionUpdateQueuedJobsLiveStatus($input)
     {
+        global $prefs;
         $response = [];
+
+        if ($prefs['feature_queued_tasks'] !== 'y') {
+            return $response;
+        }
+
         $jobsTobeUpdatedIds = array_column(QueuedTaskBanner::get(), 'id');
 
         if (empty($jobsTobeUpdatedIds)) {
@@ -61,6 +67,12 @@ class QueueManagerController
 
     public function actionProcessPendingTasks($input)
     {
+        global $prefs;
+
+        if ($prefs['feature_queued_tasks'] !== 'y') {
+            return false;
+        }
+
         session_write_close();
         $console = new Application();
         $console->add(new TaskQueueProcessCommand());


=====================================
lib/jquery_tiki/tiki-jquery.js
=====================================
@@ -4394,8 +4394,10 @@ $(document).ready(function() {
         });
     };
 
-    setInterval(pollingLiveTaskQueuedStatus, 7000);
-    setInterval(pollingProcessPendingTasks, 60000);
+    if (jqueryTiki.feature_queued_tasks) {
+        setInterval(pollingLiveTaskQueuedStatus, 7000);
+        setInterval(pollingProcessPendingTasks, 60000);
+    }
 });
 
 function downloadBase64ImageAsFile(dataUrl, fileName = null) {


=====================================
lib/setup/javascript.php
=====================================
@@ -245,6 +245,7 @@ $jqueryTiki['cookie_consent_categories'] = json_encode(array_keys(CookieConsentL
 $jqueryTiki['cookie_consent_value'] = json_encode(CookieConsentLib::getConsentPreferences(), JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
 $jqueryTiki['BUILTIN_COOKIE_CATEGORY_ESSENTIAL'] = json_encode(CookieConsentLib::BUILTIN_COOKIE_CATEGORY_ESSENTIAL);
 $jqueryTiki['wiki_url_scheme'] = $prefs['wiki_url_scheme'];
+$jqueryTiki['feature_queued_tasks'] = $prefs['feature_queued_tasks'] === 'y';
 
 //set at 4 hours if empty
 $jqueryTiki['securityTimeout'] = ! empty($prefs['site_security_timeout']) ? $prefs['site_security_timeout']



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

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/3b51dbb3c821714094a75bf94ffc11819c67879e
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.