]> git.mxchange.org Git - friendica.git/commitdiff
Corrected query
authorMichael <heluecht@pirati.ca>
Sat, 17 Jun 2017 14:15:17 +0000 (14:15 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 17 Jun 2017 14:15:17 +0000 (14:15 +0000)
include/poller.php

index 816bcb53eceade70f001f7d79e9d5f22933cd19b..55aa82a3f5d8b6a5c72c0602289f0bab6475feb1 100644 (file)
@@ -519,7 +519,7 @@ function poller_too_much_workers() {
                        dba::close($processes);
 
                        // Now adding all processes with workerqueue entries
-                       $entries = dba::p("SELECT COUNT(*) AS `entries`, `priority` FROM `workerqueue` AND NOT `done` GROUP BY `priority`");
+                       $entries = dba::p("SELECT COUNT(*) AS `entries`, `priority` FROM `workerqueue` WHERE NOT `done` GROUP BY `priority`");
                        while ($entry = dba::fetch($entries)) {
                                $processes = dba::p("SELECT COUNT(*) AS `running` FROM `process` INNER JOIN `workerqueue` ON `workerqueue`.`pid` = `process`.`pid` AND NOT `done` WHERE `priority` = ?", $entry["priority"]);
                                if ($process = dba::fetch($processes)) {