1
1
Fork 0

"UpdateSuggestions" added

This commit is contained in:
Michael 2019-12-20 20:49:09 +00:00
parent a1ad549e0b
commit bf852cc096
3 changed files with 18 additions and 4 deletions

View file

@ -75,7 +75,7 @@ class Cron
Worker::add(PRIORITY_LOW, "DiscoverPoCo", "update_server");
Worker::add(PRIORITY_LOW, "DiscoverPoCo", "suggestions");
Worker::add(PRIORITY_LOW, 'UpdateSuggestions');
Worker::add(PRIORITY_LOW, 'Expire');

View file

@ -27,7 +27,6 @@ class DiscoverPoCo
/*
This function can be called in these ways:
- checkcontact: Updates gcontact entries
- suggestions: Discover other servers for their contacts.
- server <poco url>: Searches for the poco server list. "poco url" is base64 encoded.
- update_server: Frequently check the first 250 servers for vitality.
- PortableContact::load: Load POCO data from a given POCO address
@ -37,8 +36,6 @@ class DiscoverPoCo
$mode = 0;
if (($command == "checkcontact") && Config::get('system', 'poco_completion')) {
self::discoverUsers();
} elseif ($command == "suggestions") {
GContact::updateSuggestions();
} elseif ($command == "server") {
$server_url = $param1;
if ($server_url == "") {

View file

@ -0,0 +1,17 @@
<?php
/**
* @file src/Worker/UpdateSuggestions.php
*/
namespace Friendica\Worker;
use Friendica\Core\Logger;
use Friendica\Model\GContact;
class UpdateSuggestions
{
// Discover other servers for their contacts.
public static function execute()
{
GContact::updateSuggestions();
}
}