]> git.mxchange.org Git - friendica.git/commitdiff
Fix: Corected config value name
authorMichael <heluecht@pirati.ca>
Mon, 11 Feb 2019 04:39:24 +0000 (04:39 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 11 Feb 2019 04:39:24 +0000 (04:39 +0000)
config/defaults.config.php
src/Core/Worker.php

index f81e84b0afc20056cd9337f016843ba81d2b9e0a..c1ecbb42179c3e53dbfe0ab079f0c730ff8e52ee 100644 (file)
@@ -397,9 +397,9 @@ return [
                // If enabled, it prints out the jobs per minute.
                'worker_jpm' => false,
 
-               // worker_jpm_limit (String)
+               // worker_jpm_range (String)
                // List of minutes for the jobs per minute (JPM) calculation
-               'worker_jpm_limit' => '1, 10, 60',
+               'worker_jpm_range' => '1, 10, 60',
 
                // worker_load_exponent (Integer)
                // Default 3, which allows only 25% of the maximum worker queues when server load reaches around 37% of maximum load.
index c8a4c038bbc44f78f5979171cee2cfc71ab3e0de..206a300ee46a9bc94485ae46560f46babc041a49 100644 (file)
@@ -718,6 +718,12 @@ class Worker
                                $intervals = explode(',', Config::get('system', 'worker_jpm_range'));
                                $jobs_per_minute = [];
                                foreach ($intervals as $interval) {
+                                       if ($interval == 0) {
+                                               continue;
+                                       } else {
+                                               $interval = (int)$interval;
+                                       }
+
                                        $stamp = (float)microtime(true);
                                        $jobs = DBA::p("SELECT COUNT(*) AS `jobs` FROM `workerqueue` WHERE `done` AND `executed` > UTC_TIMESTAMP() - INTERVAL ? MINUTE", $interval);
                                        self::$db_duration += (microtime(true) - $stamp);