diff options
author | Mario <mario@mariovavti.com> | 2023-04-08 20:25:31 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-04-08 20:25:31 +0000 |
commit | 1538107ae45f9b7c09d377083cf969ca81d373c0 (patch) | |
tree | 2a2bd385ae70b0f0e51748856ad936de03a61446 | |
parent | 9b93dc51373878d7a0cbce3053e4308e7715b9c1 (diff) | |
download | volse-hubzilla-1538107ae45f9b7c09d377083cf969ca81d373c0.tar.gz volse-hubzilla-1538107ae45f9b7c09d377083cf969ca81d373c0.tar.bz2 volse-hubzilla-1538107ae45f9b7c09d377083cf969ca81d373c0.zip |
minor queueworker fixes
-rw-r--r-- | Zotlabs/Lib/QueueWorker.php | 6 | ||||
-rw-r--r-- | Zotlabs/Module/Admin/Queueworker.php | 2 |
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>"; |