aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Lib/QueueWorker.php6
-rw-r--r--Zotlabs/Module/Admin/Queueworker.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/Zotlabs/Lib/QueueWorker.php b/Zotlabs/Lib/QueueWorker.php
index 696fb79fc..a1c13ef8a 100644
--- a/Zotlabs/Lib/QueueWorker.php
+++ b/Zotlabs/Lib/QueueWorker.php
@@ -159,7 +159,7 @@ class QueueWorker {
//usleep(self::$workersleep);
- $workers = dbq("select count(distinct workerq_reservationid) as total from workerq where workerq_reservationid is not null");
+ $workers = dbq("select count(*) as total from workerq where workerq_reservationid is not null");
logger("WORKERCOUNT: " . $workers[0]['total'], LOGGER_DEBUG);
return intval($workers[0]['total']);
@@ -172,7 +172,7 @@ class QueueWorker {
$wid = uniqid('', true);
- usleep(mt_rand(300000, 1000000)); //Sleep .3 - 1 seconds before creating a new worker.
+ //usleep(mt_rand(300000, 1000000)); //Sleep .3 - 1 seconds before creating a new worker.
$workers = self::GetWorkerCount();
@@ -197,7 +197,7 @@ class QueueWorker {
$work = dbq("SELECT workerq_id, workerq_cmd FROM workerq WHERE workerq_reservationid IS NULL ORDER BY workerq_priority DESC, workerq_id ASC LIMIT 1 FOR UPDATE $sql_quirks");
if (!$work) {
- self::qcommit();
+ self::qrollback();
return false;
}
diff --git a/Zotlabs/Module/Admin/Queueworker.php b/Zotlabs/Module/Admin/Queueworker.php
index 45a09bf04..a4f38d07c 100644
--- a/Zotlabs/Module/Admin/Queueworker.php
+++ b/Zotlabs/Module/Admin/Queueworker.php
@@ -41,7 +41,7 @@ class Queueworker extends Controller {
$content .= "<H4>There are " . $r[0]['total'] . " queue items to be processed.</H4>";
- $r = dbq("select count(distinct workerq_reservationid) as qworkers from workerq where workerq_reservationid is not null");
+ $r = dbq("select count(*) as qworkers from workerq where workerq_reservationid is not null");
$content .= "<H4>Active workers: " . $r[0]['qworkers'] . "</H4>";