aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/QueueWorker.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2022-12-12 23:26:45 +0100
committerMario Vavti <mario@mariovavti.com>2022-12-12 23:26:45 +0100
commitc9e170dfcc83a946fda7d4335c136ed40b3c579d (patch)
tree52ee00eefa5ab9f660f3dbf1135b33a11e1cb295 /Zotlabs/Lib/QueueWorker.php
parente3a19469eb6940249ad87662399d14dbf2a79847 (diff)
downloadvolse-hubzilla-c9e170dfcc83a946fda7d4335c136ed40b3c579d.tar.gz
volse-hubzilla-c9e170dfcc83a946fda7d4335c136ed40b3c579d.tar.bz2
volse-hubzilla-c9e170dfcc83a946fda7d4335c136ed40b3c579d.zip
queueworker: introduce new interval config queueworker.queue_interval - defaults to 500000 microseconds. No config UI yet.
Diffstat (limited to 'Zotlabs/Lib/QueueWorker.php')
-rw-r--r--Zotlabs/Lib/QueueWorker.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/Zotlabs/Lib/QueueWorker.php b/Zotlabs/Lib/QueueWorker.php
index 9f60e3315..468383ae2 100644
--- a/Zotlabs/Lib/QueueWorker.php
+++ b/Zotlabs/Lib/QueueWorker.php
@@ -66,7 +66,7 @@ class QueueWorker {
return;
}
- public static function Summon(&$argv) {
+ public static function Summon($argv) {
if ($argv[0] !== 'Queueworker') {
@@ -102,19 +102,18 @@ class QueueWorker {
return;
}
self::qcommit();
- logger('INSERTED: ' . $workinfo_json, LOGGER_DEBUG);
+ hz_syslog('INSERTED: ' . $workinfo_json, LOGGER_DEBUG);
}
- $argv = [];
$workers = self::GetWorkerCount();
if ($workers < self::$maxworkers) {
- logger("Less than max active workers ($workers) max = " . self::$maxworkers . ".", LOGGER_DEBUG);
+ hz_syslog("Less than max active workers ($workers) max = " . self::$maxworkers . ".", LOGGER_DEBUG);
$phpbin = get_config('system', 'phpbin', 'php');
proc_run($phpbin, 'Zotlabs/Daemon/Master.php', ['Queueworker']);
}
}
- public static function Release(&$argv) {
+ public static function Release($argv) {
if ($argv[0] !== 'Queueworker') {
@@ -152,7 +151,7 @@ class QueueWorker {
self::qcommit();
logger('INSERTED: ' . $workinfo_json, LOGGER_DEBUG);
}
- $argv = [];
+
self::Process();
}
@@ -228,7 +227,7 @@ class QueueWorker {
public static function Process() {
if (!self::GetWorkerID()) {
- logger('Unable to get worker ID. Exiting.', LOGGER_DEBUG);
+ hz_syslog('Unable to get worker ID. Exiting.', LOGGER_DEBUG);
killme();
}