From 5e780ba089aa8493eb5bec30558345b070ef808c Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 27 Jan 2024 16:36:26 +0000 Subject: implement short time object cache to reduce network calls and some cleanup --- Zotlabs/Daemon/Fetchparents.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Daemon') diff --git a/Zotlabs/Daemon/Fetchparents.php b/Zotlabs/Daemon/Fetchparents.php index 4daf8c019..b00acdfbf 100644 --- a/Zotlabs/Daemon/Fetchparents.php +++ b/Zotlabs/Daemon/Fetchparents.php @@ -14,8 +14,8 @@ class Fetchparents { return; } - $channel = channelx_by_n(intval($argv[1])); - if (!$channel) { + $channels = explode(',', $argv[1]); + if (!$channels) { return; } @@ -31,7 +31,10 @@ class Fetchparents { $force = $argv[4] ?? false; - Activity::fetch_and_store_parents($channel, $observer_hash, $mid, null, $force); + foreach ($channels as $channel_id) { + $channel = channelx_by_n($channel_id); + Activity::fetch_and_store_parents($channel, $observer_hash, $mid, null, $force); + } return; -- cgit v1.2.3