aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/QueueWorker.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-04-08 20:25:31 +0000
committerMario <mario@mariovavti.com>2023-04-08 20:25:31 +0000
commit1538107ae45f9b7c09d377083cf969ca81d373c0 (patch)
tree2a2bd385ae70b0f0e51748856ad936de03a61446 /Zotlabs/Lib/QueueWorker.php
parent9b93dc51373878d7a0cbce3053e4308e7715b9c1 (diff)
downloadvolse-hubzilla-1538107ae45f9b7c09d377083cf969ca81d373c0.tar.gz
volse-hubzilla-1538107ae45f9b7c09d377083cf969ca81d373c0.tar.bz2
volse-hubzilla-1538107ae45f9b7c09d377083cf969ca81d373c0.zip
minor queueworker fixes
Diffstat (limited to 'Zotlabs/Lib/QueueWorker.php')
-rw-r--r--Zotlabs/Lib/QueueWorker.php6
1 files changed, 3 insertions, 3 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;
}