aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Convo.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-12-10 17:03:57 +0000
committerMario <mario@mariovavti.com>2022-12-10 17:03:57 +0000
commite1c28351734d175476bc8f0d6cdf261dee3c07e0 (patch)
tree50b4659c904c0b2803d57d114a104ccd8655fd6c /Zotlabs/Daemon/Convo.php
parent4f9a933108eb0a41671ec9464f1d7fb90c2d2233 (diff)
downloadvolse-hubzilla-e1c28351734d175476bc8f0d6cdf261dee3c07e0.tar.gz
volse-hubzilla-e1c28351734d175476bc8f0d6cdf261dee3c07e0.tar.bz2
volse-hubzilla-e1c28351734d175476bc8f0d6cdf261dee3c07e0.zip
add option to set worker sleep based on load average, remove redundand code and add return to some daemons
Diffstat (limited to 'Zotlabs/Daemon/Convo.php')
-rw-r--r--Zotlabs/Daemon/Convo.php31
1 files changed, 19 insertions, 12 deletions
diff --git a/Zotlabs/Daemon/Convo.php b/Zotlabs/Daemon/Convo.php
index 940216b2c..d1a7e4f4d 100644
--- a/Zotlabs/Daemon/Convo.php
+++ b/Zotlabs/Daemon/Convo.php
@@ -30,6 +30,7 @@ class Convo {
intval($channel_id),
dbesc($contact_hash)
);
+
if (!$r) {
return;
}
@@ -40,19 +41,25 @@ class Convo {
$messages = $obj->get();
- if ($messages) {
- foreach ($messages as $message) {
- if (is_string($message)) {
- $message = Activity::fetch($message, $channel);
- }
- // set client flag because comments will probably just be objects and not full blown activities
- // and that lets us use implied_create
- $AS = new ActivityStreams($message);
- if ($AS->is_valid() && is_array($AS->obj)) {
- $item = Activity::decode_note($AS);
- Activity::store($channel, $contact['abook_xchan'], $AS, $item);
- }
+ if (!$messages) {
+ return;
+ }
+
+ foreach ($messages as $message) {
+ if (is_string($message)) {
+ $message = Activity::fetch($message, $channel);
+ }
+
+ // set client flag because comments will probably just be objects and not full blown activities
+ // and that lets us use implied_create
+ $AS = new ActivityStreams($message);
+ if ($AS->is_valid() && is_array($AS->obj)) {
+ $item = Activity::decode_note($AS);
+ Activity::store($channel, $contact['abook_xchan'], $AS, $item);
}
}
+
+ return;
+
}
}