aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Activity.php7
-rw-r--r--Zotlabs/Lib/QueueWorker.php8
2 files changed, 11 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 4cb208b18..7089f043c 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -122,7 +122,6 @@ class Activity {
$h = HTTPSig::create_sig($headers, $channel['channel_prvkey'], channel_url($channel), false);
$start_timestamp = microtime(true);
$x = z_fetch_url($url, true, $redirects, ['headers' => $h]);
- logger('queueworker_stats_process_duration: cmd:Activity_fetch' . ' start_timestamp:' . $start_timestamp . ' ' . 'end_timestamp:' . microtime(true) . ' meta:' . $url . '##' . random_string(16));
}
if ($x['success']) {
@@ -144,12 +143,14 @@ class Activity {
logger('returned: ' . json_encode($y, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES), LOGGER_DEBUG);
if (isset($y['type']) && ActivityStreams::is_an_actor($y['type'])) {
-
- logger('queueworker_stats_process_duration: cmd:Actor_fetch' . ' start_timestamp:' . $start_timestamp . ' ' . 'end_timestamp:' . microtime(true) . ' meta:' . $url . '##' . random_string(16));
+ logger('logger_stats_data cmd:Actor_fetch' . ' start:' . $start_timestamp . ' ' . 'end:' . microtime(true) . ' meta:' . $url . '#' . random_string(16));
btlogger('actor fetch');
$y['actor_cache_date'] = datetime_convert();
XConfig::Set($y['id'], 'system', 'actor_record', $y);
}
+ else {
+ logger('logger_stats_data cmd:Activity_fetch' . ' start:' . $start_timestamp . ' ' . 'end:' . microtime(true) . ' meta:' . $url . '#' . random_string(16));
+ }
return json_decode($x['body'], true);
}
diff --git a/Zotlabs/Lib/QueueWorker.php b/Zotlabs/Lib/QueueWorker.php
index 1c74b42d8..68e747b0f 100644
--- a/Zotlabs/Lib/QueueWorker.php
+++ b/Zotlabs/Lib/QueueWorker.php
@@ -63,6 +63,8 @@ class QueueWorker {
return;
}
+ logger('queueworker_stats_summon: cmd:' . $argv[0] . ' ' . 'timestamp:' . time());
+
self::qstart();
$r = q("INSERT INTO workerq (workerq_priority, workerq_data, workerq_uuid, workerq_cmd) VALUES (%d, '%s', '%s', '%s')",
intval($priority),
@@ -299,12 +301,16 @@ class QueueWorker {
$cls = '\\Zotlabs\\Daemon\\' . $argv[0];
$argv = flatten_array_recursive($argv);
$argc = count($argv);
- $rnd = random_string();
+ $rnd = random_string(16);
logger('PROCESSING: ' . $rnd . ' ' . print_r($argv[0], true));
+ $start_timestamp = microtime(true);
+
$cls::run($argc, $argv);
+ logger('logger_stats_data cmd:' . $argv[0] . ' start:' . $start_timestamp . ' ' . 'end:' . microtime(true) . ' meta:' . $rnd);
+
logger('COMPLETED: ' . $rnd);
// @FIXME: Right now we assume that if we get a return, everything is OK.