From ffe429be65e8d6198579d3dd987053387799ca78 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 1 Apr 2020 07:44:07 +0000 Subject: transition connections to zot6 if their site has been updated --- Zotlabs/Daemon/Cron_daily.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Zotlabs/Daemon') diff --git a/Zotlabs/Daemon/Cron_daily.php b/Zotlabs/Daemon/Cron_daily.php index 452ef45f1..2cf0c9119 100644 --- a/Zotlabs/Daemon/Cron_daily.php +++ b/Zotlabs/Daemon/Cron_daily.php @@ -96,7 +96,9 @@ class Cron_daily { Master::Summon(array('Cli_suggest')); remove_obsolete_hublocs(); + z6_discover(); + z6trans_connections(); call_hooks('cron_daily',datetime_convert()); -- cgit v1.2.3 From 643b2f9205b713bbb3667fdb4d0d549111ccfcaa Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 1 Apr 2020 08:03:19 +0000 Subject: do not enable transition of connections yet --- Zotlabs/Daemon/Cron_daily.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Daemon') diff --git a/Zotlabs/Daemon/Cron_daily.php b/Zotlabs/Daemon/Cron_daily.php index 2cf0c9119..23099745b 100644 --- a/Zotlabs/Daemon/Cron_daily.php +++ b/Zotlabs/Daemon/Cron_daily.php @@ -98,7 +98,7 @@ class Cron_daily { remove_obsolete_hublocs(); z6_discover(); - z6trans_connections(); + //z6trans_connections(); call_hooks('cron_daily',datetime_convert()); -- cgit v1.2.3 From 38be2386dd63a4a18c07e445b9859a5836ed5b46 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 1 Apr 2020 09:26:27 +0000 Subject: cheat with guid_sig to reflect transition to zot6 and re-enable transition of connections --- Zotlabs/Daemon/Cron_daily.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Daemon') diff --git a/Zotlabs/Daemon/Cron_daily.php b/Zotlabs/Daemon/Cron_daily.php index 23099745b..2cf0c9119 100644 --- a/Zotlabs/Daemon/Cron_daily.php +++ b/Zotlabs/Daemon/Cron_daily.php @@ -98,7 +98,7 @@ class Cron_daily { remove_obsolete_hublocs(); z6_discover(); - //z6trans_connections(); + z6trans_connections(); call_hooks('cron_daily',datetime_convert()); -- cgit v1.2.3 From d925ec675984d59b750c91bdd53106ea414bcf71 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 1 Apr 2020 18:13:00 +0000 Subject: fix outgoing mails to zot connections --- Zotlabs/Daemon/Notifier.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Daemon') diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index fdf0148a6..d66079216 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -737,10 +737,16 @@ class Notifier { } if(stripos($hub['site_project'], 'hubzilla') !== false && version_compare($hub['site_version'], '4.7.3', '<=')) { - $encoded_item['owner']['network'] = 'zot'; - $encoded_item['owner']['guid_sig'] = str_replace('sha256.', '', $encoded_item['owner']['guid_sig']); - $encoded_item['author']['network'] = 'zot'; - $encoded_item['author']['guid_sig'] = str_replace('sha256.', '', $encoded_item['author']['guid_sig']); + if($encoded_item['type'] === 'mail') { + $encoded_item['from']['network'] = 'zot'; + $encoded_item['from']['guid_sig'] = str_replace('sha256.', '', $encoded_item['from']['guid_sig']); + } + else { + $encoded_item['owner']['network'] = 'zot'; + $encoded_item['owner']['guid_sig'] = str_replace('sha256.', '', $encoded_item['owner']['guid_sig']); + $encoded_item['author']['network'] = 'zot'; + $encoded_item['author']['guid_sig'] = str_replace('sha256.', '', $encoded_item['author']['guid_sig']); + } } queue_insert( -- cgit v1.2.3 From 4b3979df04e0cba12049dced3ba037a004c324f6 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Fri, 3 Apr 2020 10:49:57 +0200 Subject: Avoid multiple run of expiry procedure on large sites --- Zotlabs/Daemon/Expire.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Zotlabs/Daemon') diff --git a/Zotlabs/Daemon/Expire.php b/Zotlabs/Daemon/Expire.php index 398425861..f3f42df6f 100644 --- a/Zotlabs/Daemon/Expire.php +++ b/Zotlabs/Daemon/Expire.php @@ -8,6 +8,13 @@ class Expire { static public function run($argc,$argv){ cli_startup(); + + if ($pid = get_config('expire', 'procid', false) && (function_exists('posix_kill') ? posix_kill($pid, 0) : true)) { + logger('Expire: procedure already run with PID ' . $pid, LOGGER_DEBUG); + return; + } + + set_config('expire', 'procid', getmypid()); // perform final cleanup on previously delete items @@ -90,5 +97,7 @@ class Expire { logger('Expire: sys: done', LOGGER_DEBUG); } + + del_config('expire', 'procid'); } } -- cgit v1.2.3